On Wed, Jul 20, 2011 at 4:15 PM, Randall Leeds <[email protected]>wrote:
>
> I don't like an "is actually a HEAD request" flag.
> Adding HEAD handlers is the right approach, but if we want to be lazy
> we could support a fallback to GET when we get a function_clause error
> trying to call the handler.
>
>
Unfortunately, that won't work. Most handlers have a clause that looks like
this:
db_req(#httpd{path_parts=[_DbName]}=Req, _Db) ->
send_method_not_allowed(Req, "DELETE,GET,HEAD,POST");
that will catch that inappropriate HEAD request. I guess
send_method_not_allowed/2 could be modified to test if HEAD is in the list
and throw an error.
I'll dig into the archives and see if I can find the previous discussion on
the topic. I might have to put an uber-ugly hack in for my use in the
meantime. I don't mind spending time doing the "right" thing as long as I
know what the "right" thing is.
tj
--
*Travis Jensen*
***
*Read the Software Maven @ http://softwaremaven.innerbrane.com/
Read my LinkedIn profile @ http://www.linkedin.com/in/travisjensen
Read my Twitter mumblings @ http://twitter.com/SoftwareMaven
Send me email @ [email protected]
**What kind of guy calls himself the Software Maven???**