From f20b798a07953a244ce9a2ff0c72c4f63bd38129 Mon Sep 17 00:00:00 2001 From: harshgMSFT Date: Thu, 20 Mar 2014 18:19:11 -0700 Subject: [PATCH] Modifying the Default Action convention to have verb only methods --- .../DefaultActionDiscoveryConventions.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Microsoft.AspNet.Mvc.Core/DefaultActionDiscoveryConventions.cs b/src/Microsoft.AspNet.Mvc.Core/DefaultActionDiscoveryConventions.cs index 2c64953c4a..6fda17d69e 100644 --- a/src/Microsoft.AspNet.Mvc.Core/DefaultActionDiscoveryConventions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/DefaultActionDiscoveryConventions.cs @@ -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()