Yes, your article came up high in my research and it was very interesting (in the sense of slightly worrisome!). Your subscriber count went up by one this morning :-)
Reassured somewhat that I'm thinking along the right lines I'm tempted to get something working and then submit a patch. I guess there's the PUT/POST translation to follow as a model. To be honest I'm not 100% sure how serious this is - my interest is in adding a resource discovery protool and I need only headers (specifically link headers) for 1-3 requests on client startup before a GET is fully justified. Slightly inefficient (not to mention distasteful) to use GET, but no disaster. Are there situations where it hurts more? Mike On Feb 3, 11:50 am, Graham Dumpleton <[email protected]> wrote: > You may find my blog post about GET/HEAD and WSGI interesting. > > http://blog.dscpl.com.au/2009/10/wsgi-issues-with-http-head-requests.... > > Because of Python web frameworks doing all sort of odd things and not > always handling HEAD properly, I in part felt that WSGI adapters > should always just convert HEAD to GET as is safest thing to do to > ensure correct behaviour. > > Graham > > On Feb 3, 9:35 pm, Mike Burrows <[email protected]> wrote: > > > When routes have conditions that constrain the request method to GET, > > any HEAD requests result in 405 Method Not Allowed. Bug or feature? > > > With HEAD added as an allowed method, the server (paster) does the > > right thing and returns a zero-length body. > > > Working around this in one's routing isn't always an easy option - > > mapper.resource() or mapper.collection() don't add HEAD automatically, > > and they probably shouldn't either. Can't help thinking that somewhere > > in the middleware stack (before Routes I guess) a HEAD should be > > turned temporarily into GET so that HEAD is allowed everywhere GET > > is. As such this feels to me a Pylons issue. Before I raise a > > ticket, any thoughts? > > > Small asides: > > (1) I haven't tested what happens if you use @restrict instead (I > > don't use it) > > (2) a head() method in paste.fixture would be nice, but in the > > meantime app._gen_request('HEAD', ...) does the job. Tried real http > > requests using curl too. > > > Regards, > > Mike -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
