Browse files

added support for X-HTTP-method-override header. only tested running …

…under isapi/iis. i'm very noob, and have no idea if i've done this right or not, but it works for my needs. i'd love to hear anybody's feedback.
  • Loading branch information...
1 parent cd4ddf8 commit 4872e4ff98c7b0360753a1b3ab1b219af254707f @notatoad committed Oct 31, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 web/
3 web/
@@ -377,6 +377,9 @@ def load(self, env):
def _delegate(self, f, fvars, args=[]):
def handle_class(cls):
meth = web.ctx.method
+ override = web.ctx.env.get("HTTP_X_HTTP_METHOD_OVERRIDE", None)
+ if override in ("PUT", "DELETE",):
+ meth=override
if meth == 'HEAD' and not hasattr(cls, meth):
meth = 'GET'
if not hasattr(cls, meth):

0 comments on commit 4872e4f

Please sign in to comment.