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.