title: Why is the System.Web.Mvc.HttpVerbs class missing TRACE, CONNECT & OPTIONS?
body: <p>The <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html" rel="nofollow">RFC 2616 HTTP/1.1 definition</a> states that the following common HTTP methods exist:</p>
  
  <p>GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT</p>
  
  <p>But the <a href="http://aspnet.codeplex.com/SourceControl/changeset/view/72551#288017" rel="nofollow">System.Web.Mvc.HttpVerbs</a> enum is missing TRACE, OPTIONS &amp; CONNECT.</p>
  
  <p>I've got an action filter which picks up the HttpVerb from the request in order to make certain decisions (for example, if a request is PUT'ing a model of base type A, then i set some data), so this utility code is throwing an ArgumentOutOfRangeException for requests of the last three (mostly OPTIONS - looks like it's coming from Google Translate):</p>
  
  <pre><code>public static HttpVerbs GetHttpVerb(this HttpRequestBase httpRequestBase)
  {
      switch (httpRequestBase.HttpMethod)
      {
          case "GET":
              return HttpVerbs.Get;
          case "POST":
              return HttpVerbs.Post;
          case "PUT":
              return HttpVerbs.Put;
          case "DELETE":
              return HttpVerbs.Delete;
          case "HEAD":
              return HttpVerbs.Head;    
          default:
              throw new ArgumentOutOfRangeException("httpRequestBase");
      }
  }
  </code></pre>
  
  <p>Not sure how to get around this - any ideas? </p>
  
  <p>Only thing i can think of is change all referencing code to check the raw HTTP method first, then only call the utility if it's not TRACE, OPTIONS or CONNECT. Which is kinda hacky.</p>
  
  <p>Why is it missing from the enum class? Is there a specific reason for it? Can MVC simply not handle requests of these types? </p>
  
  <p>By the sounds of the OPTIONS method, it shouldn't even get to MVC, and it should be handled by IIS itself?</p>