That response is coming from HTTP::Server::Simple, Dancer&#39;s built-in development web server, which does not appear to support the OPTIONS request method.<div><br></div><div><a href="http://search.cpan.org/~jesse/HTTP-Server-Simple-0.44/lib/HTTP/Server/Simple.pm#valid_http_method%28$method%29">http://search.cpan.org/~jesse/HTTP-Server-Simple-0.44/lib/HTTP/Server/Simple.pm#valid_http_method%28$method%29</a><br>
<div><br><div class="gmail_quote">On 28 December 2012 18:56, Rik Brown <span dir="ltr">&lt;<a href="mailto:rik@rikbrown.co.uk" target="_blank">rik@rikbrown.co.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

                <div>
                    Hi all,
                </div><div><br></div><div>I&#39;m playing with implementing an OPTIONS route.  </div><div><br></div><div>The following code:</div><div><br></div><div>options &#39;/&#39; =&gt; sub {</div><div>  return { something =&gt; 1 }</div>
<div>}</div><div><br></div><div>returns this:</div><div><div>&lt;html&gt;</div><div>    &lt;head&gt;</div><div>        &lt;title&gt;Bad Request&lt;/title&gt;</div><div>    &lt;/head&gt;</div><div>    &lt;body&gt;</div><div>
        &lt;h1&gt;Bad Request&lt;/h1&gt;</div><div>        &lt;p&gt;Your browser sent a request which this web server could not</div><div>      grok.&lt;/p&gt;</div><div>    &lt;/body&gt;</div><div>&lt;/html&gt;</div><div>
<br></div><div>- whereas if the Dancer code is switched to &#39;get&#39; and a GET is used, it works fine.  </div><div><br></div><div>This request doesn&#39;t even seem to be hitting my Dancer app (just running through <a href="http://myapp.pl" target="_blank">myapp.pl</a> right now) - no entries in the log, even on &#39;core&#39; level.</div>
<div><br></div><div>Does anyone have any thoughts before I dig further?</div><div><br></div><div>Cheers,</div><div>Rik</div></div><span class="HOEnZb"><font color="#888888">
                <div><div><br></div><div>-- </div><div>Rik Brown</div><div><a href="http://www.rikbrown.co.uk" target="_blank">http://www.rikbrown.co.uk</a></div><div><br></div></div>
            </font></span><br>_______________________________________________<br>
dancer-users mailing list<br>
<a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
<br></blockquote></div><br></div></div>