Fix the Allow: header value in 405 "Method not allowed." response.
Signed-off-by: zhang-liang-pengkun <zhangliangpengkun@xfusion.com>
This commit is contained in:
parent
1f916d590b
commit
c69b35fb76
@ -0,0 +1,26 @@
|
||||
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
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: python-bottle
|
||||
Version: 0.12.13
|
||||
Release: 15
|
||||
Release: 16
|
||||
Summary: WSGI micro web-framework for Python.
|
||||
License: MIT
|
||||
URL: http://bottlepy.org
|
||||
@ -14,6 +14,7 @@ Patch0004: 0003-Added-Python-3.4-3.7-language-classifiers.patch
|
||||
Patch0005: 0004-fix-1115-Some-modules-set-__file__-as-None.patch
|
||||
Patch0006: 0005-fix-1148-redirect-and-non-ascii-characters.patch
|
||||
Patch0007: 0006-1177-Bug-fix-of-missing-regex-escaped-back-slashes.patch
|
||||
Patch0008: 0007-Fix-the-Allow-header-value-in-405-Method-not-allowed.patch
|
||||
BuildArch: noarch
|
||||
BuildRequires: python2-devel python2-setuptools python3-devel python3-setuptools
|
||||
|
||||
@ -68,10 +69,13 @@ sed -i '/^#!/d' bottle.py
|
||||
%{python3_sitelib}/*
|
||||
|
||||
%changelog
|
||||
* Fri Dec 29 2023 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 0.12.13-16
|
||||
- Fix the Allow: header value in 405 "Method not allowed." response.
|
||||
|
||||
* Tue Dec 26 2023 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 0.12.13-15
|
||||
- Bug fix of missing regex escaped back slashes
|
||||
|
||||
* Thu Dec 21 2023 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 0.12.13-14
|
||||
* Wed Dec 20 2023 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 0.12.13-14
|
||||
- fix #1148: redirect() and non-ascii characters
|
||||
|
||||
* Tue Dec 05 2023 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 0.12.13-13
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user