title: Why is the MVC action method selector not choosing my HttpPut action?
body: <p>Given the following route:</p>
  
  <pre><code>context.MapRoute(null, "widgets", 
      new { controller = "Widgets", action = "Add" }, 
      new { httpMethod = new HttpMethodConstraint("PUT") });
  </code></pre>
  
  <p>And the following controller:</p>
  
  <pre><code>public class WidgetsController
  {
      [HttpPut]
      public ActionResult Add(WidgetForm model)
      {
          return DoStuff(); // code here doesn't matter
      }
  }
  </code></pre>
  
  <p>And a view that renders the following form (using <code>HtmlHelper.@Html.HttpMethodOverride(HttpVerbs.Put)</code>:</p>
  
  <pre><code>&lt;form action="/widgets" method="post"&gt;
      &lt;!-- many form elements, then --&gt;
      &lt;input name="X-HTTP-Method-Override" type="hidden" value="PUT" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>When the form is submitted, the MVC action method selector does not choose the above action method. If I set a breakpoint on the opening brace, it is never hit. In browser, it returns 404 page (I believe this is the default ActionNotFound behavior). </p>
  
  <p>However, the action method selector does choose the Add HttpPut method with the following route:</p>
  
  <pre><code>context.MapRoute(null, "widgets", 
      new { controller = "Widgets", action = "Add" }, 
      new { httpMethod = new HttpMethodConstraint("PUT", "POST") });
  </code></pre>
  
  <p>This doesn't seem right... is it? It seems to me that I should be able to do this without a POST constraint. The action method is not decorated with HttpPost, so why should the POST constraint be necessary?</p>