Ah, the custom predicates makes sense, but the syntax is really obtuse.

I'll look (briefly) at coding up request_method=('GET', 'HEAD') and submit a
pull request if there's no objection here.  I suspect it's as simple as
replacing "==" with "in".  :)

Yeah, so I'm just interested in how to send back the same response for HEAD
as I do for GET, and I'm going to let apache drop the body (which it should
to conform to the spec).

Is there any way to tell apache "just make a GET request for a HEAD, and
throw away the body and respond as usual?"   That way I don't have to put a
custom predicate on every single view.

Alternatively, is this something nginx can do easily?  (even better, if
nginx did somithng smart for the if-modified-since header, etc. that would
also be awesome, but I'm a total nginx noob)

Steve

On Thu, Mar 10, 2011 at 11:12 AM, Reed L O'Brien <reedobr...@gmail.com>wrote:

> On Mar 10, 2011, at 1:44 PM, Stephen Lacy wrote:
>
> > What's the recommended way to get proper HEAD request support using
> pyramid + mod_wsgi?
> >
> > Right now, with my "vanilla" mod_wsgi configs, and request_method='GET'
> on my view_config decorators, my HEAD requests are 404'ing.   I tried
> setting request_method=['GET', 'HEAD'] but it seems as this syntax isn't
> supported.  I couldn't find anything about HEAD requests in the docs.
>
> Or are you asking how to implement a HEAD request rather than configure a
> view to respond for multiple verbs?
>
> Perhaps I answered the wrong question....
>
> Cheers,
> ~ro
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-devel" group.
> To post to this group, send email to pylons-devel@googlegroups.com.
> To unsubscribe from this group, send email to
> pylons-devel+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/pylons-devel?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to