Endpoint registering '/ep' will no longer match '/ep/x'.
Trailing slashes removed. So '/ep/' will become '/ep'.
This commit is contained in:
parent
f949738db9
commit
7ae6910853
2 changed files with 6 additions and 3 deletions
|
|
@ -22,7 +22,7 @@ namespace Rests
|
|||
{
|
||||
Name = name;
|
||||
UriTemplate = uritemplate;
|
||||
UriVerbMatch = string.Join("([^/]*)", Regex.Split(uritemplate, "\\{[^\\{\\}]*\\}"));
|
||||
UriVerbMatch = string.Format("^{0}$", string.Join("([^/]*)", Regex.Split(uritemplate, "\\{[^\\{\\}]*\\}")));
|
||||
var matches = Regex.Matches(uritemplate, "\\{([^\\{\\}]*)\\}");
|
||||
UriVerbs = (from Match match in matches select match.Groups[1].Value).ToArray();
|
||||
Callback = callback;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue