Closed
Description
In .NET 5, if no path was specified in the URL after /docs, then "index.html" was assumed and was passed as the path value.
public class StaticContentController : Controller
{
[Authorize]
[HttpGet]
[ResponseCache(Duration = 3600)]
[Route("/docs/{**path}")]
/* Place HTML contents in /static/docs/ folder. */
public IActionResult Docs(string path = "index.html")
{
return StaticContentExtensions.GetFile(this, path, "/static/docs/");
}
}
}
In .NET 6, null is being passed along as the value of path. I would expect that "index.html" should be passed in the path variable as it is set as the default of the optional parameter.