Hi List!

How do I set the "Allow" header for the "405 Method Not Allowed"
return code with the web.webapi.NoMethod() call?
This is mandatory as defined in RFC2616: "(...)The response MUST
include an Allow header containing a list of valid methods for the
requested resource. (...)"

Why is there no option "headers" like in other web.webapi methods?

And why is there a type web.webapi.nomethod() and
web.webapi.NoMethod() isn't that somewhat redundant and confusing for
the users?

I've worked around that by using:

raise web.webapi.HTTPError('405 Method Not Allowed',headers={'Allow':
'GET, POST'})

instead of:

raise web.webapi.NoMethod()

Or am I completely wrong: Don't I use this as it is intended?

Regards,
Dom

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en.

Reply via email to