You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 27, 2018. It is now read-only.
public class ValuesController : Controller
{
[HttpGet("{a=a}/{b=b}/{c=c}")]
public string Get(string a, string b, string c)
{
return $"{a} - {b} - {c}";
}
}
This should match a url like / or /10 or /10/20 or /10/20/30
However with a URL like ///hi this will match. And the output will be b - c - hi. That is, the parameter a gets the default value b and is able to match an empty string.
The text was updated successfully, but these errors were encountered:
Consider the following:
This should match a url like
/
or/10
or/10/20
or/10/20/30
However with a URL like
///hi
this will match. And the output will beb - c - hi
. That is, the parametera
gets the default valueb
and is able to match an empty string.The text was updated successfully, but these errors were encountered: