Modifying the Default Action convention to have verb only methods

This commit is contained in:
harshgMSFT 2014-03-20 18:19:11 -07:00
parent f1c4a8e497
commit f20b798a07
1 changed files with 1 additions and 3 deletions

View File

@ -13,8 +13,6 @@ namespace Microsoft.AspNet.Mvc
"POST",
"PUT",
"DELETE",
"HEAD",
"OPTIONS",
"PATCH",
};
@ -56,7 +54,7 @@ namespace Microsoft.AspNet.Mvc
for (var i = 0; i < _supportedHttpMethodsByConvention.Length; i++)
{
if (methodInfo.Name.StartsWith(_supportedHttpMethodsByConvention[i], StringComparison.OrdinalIgnoreCase))
if (methodInfo.Name.Equals(_supportedHttpMethodsByConvention[i], StringComparison.OrdinalIgnoreCase))
{
return new [] {
new ActionInfo()