27 lines
846 B
Diff
27 lines
846 B
Diff
From 2d6acef676d35611dc58ca9c3bac51789adbcce8 Mon Sep 17 00:00:00 2001
|
|
From: Remi Gacogne <rgacogne[at]nuagelabs[dot]fr>
|
|
Date: Fri, 31 Oct 2014 17:27:24 +0100
|
|
Subject: [PATCH] Fix the Allow: header value in 405 "Method not allowed."
|
|
response.
|
|
|
|
---
|
|
bottle.py | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/bottle.py b/bottle.py
|
|
index 96ca3e4..bcfc5e6 100644
|
|
--- a/bottle.py
|
|
+++ b/bottle.py
|
|
@@ -440,7 +440,7 @@ class Router(object):
|
|
nocheck = set(methods)
|
|
for method in set(self.static) - nocheck:
|
|
if path in self.static[method]:
|
|
- allowed.add(verb)
|
|
+ allowed.add(method)
|
|
for method in set(self.dyna_regexes) - allowed - nocheck:
|
|
for combined, rules in self.dyna_regexes[method]:
|
|
match = combined(path)
|
|
--
|
|
2.39.0.windows.2
|
|
|