On Thursday, March 10, 2011 1:44:17 PM UTC-5, Steve 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. >
Performing special actions for HEAD, for example avoiding generating data, is dangerous as you can screw up the results where there are outer middleware that want to consume the response and from that modify the response headers. Read: http://blog.dscpl.com.au/2009/10/wsgi-issues-with-http-head-requests.html Apache/mod_wsgi will in certain circumstances actually change a HEAD request to a GET request to workaround the problem where WSGI applications don't generate response content for HEAD and therefore screw up the operation of Apache output filters that always expect to see the content. Why are you wanting to specialise HEAD requests? Graham -- 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.