Modifying the Default Action convention to have verb only methods
This commit is contained in:
parent
f1c4a8e497
commit
f20b798a07
|
|
@ -13,8 +13,6 @@ namespace Microsoft.AspNet.Mvc
|
||||||
"POST",
|
"POST",
|
||||||
"PUT",
|
"PUT",
|
||||||
"DELETE",
|
"DELETE",
|
||||||
"HEAD",
|
|
||||||
"OPTIONS",
|
|
||||||
"PATCH",
|
"PATCH",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -56,7 +54,7 @@ namespace Microsoft.AspNet.Mvc
|
||||||
|
|
||||||
for (var i = 0; i < _supportedHttpMethodsByConvention.Length; i++)
|
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 [] {
|
return new [] {
|
||||||
new ActionInfo()
|
new ActionInfo()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue