title: Http OPTIONS request gets completely ignored by Play route config
body: <p>I'm using Play 2.2.1. I have the following route configuration in my route file:</p>
  
  <pre><code>OPTIONS       /*path          controllers.Application.options
  GET           /               controllers.Application.index
  ...some more routes
  </code></pre>
  
  <p>I have the following set up in the Applications controller:</p>
  
  <pre><code>package controllers
  
  import play.api.mvc._
  
  object Application extends Controller {
  
    def index = Action {
      Ok(views.html.index())
    }
  
    def options = Action {
      Ok("").withHeaders(
        "Access-Control-Allow-Origin" -&gt; "*",
        "Access-Control-Allow-Methods" -&gt; "GET, POST, PUT, DELETE, OPTIONS",
        "Access-Control-Allow-Headers" -&gt; "Accept, Origin, Content-type, X-Json, X-Prototype-Version, X-Requested-With",
        "Access-Control-Allow-Credentials" -&gt; "true",
        "Access-Control-Max-Age" -&gt; (60 * 60 * 24).toString
      )
    }
  }
  </code></pre>
  
  <p>When I try to test an OPTIONS request with curl, it gets completely ignored by play. </p>
  
  <pre><code>curl -X OPTIONS --include 'http://localhost:9000/foo/139'
  </code></pre>
  
  <p>I get this error back:</p>
  
  <pre><code>HTTP/1.1 404 Not Found
  Content-Type: text/html; charset=utf-8
  Content-Length: 7045
  
  
  
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Action not found&lt;/title&gt;
  
  ...some more head junk
  
      &lt;body&gt;
          &lt;h1&gt;Action not found&lt;/h1&gt;
  
          &lt;p id="detail"&gt;
              For request 'OPTIONS /foo/139'
          &lt;/p&gt;
  
  
  
                  &lt;h2&gt;
                      These routes have been tried, in this order:
                  &lt;/h2&gt;
  
                  &lt;div&gt;
  
              &lt;pre&gt;&lt;span class="line"&gt;1&lt;/span&gt;&lt;span class="route"&gt;&lt;span class="verb"&gt;GET&lt;/span&gt;&lt;span class="path"&gt;/&lt;/span&gt;&lt;span class="call"&gt;controllers.Application.index&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
  
  ... more routes but none of them are for the OPTIONS request            
  </code></pre>
  
  <p>What am I doing wrong here? Thanks in advance!</p>