diff --git a/0007-Fix-the-Allow-header-value-in-405-Method-not-allowed.patch b/0007-Fix-the-Allow-header-value-in-405-Method-not-allowed.patch new file mode 100644 index 0000000000000000000000000000000000000000..5be99f44b711ecc6fb6f6d6b4950ef386e6ae448 --- /dev/null +++ b/0007-Fix-the-Allow-header-value-in-405-Method-not-allowed.patch @@ -0,0 +1,26 @@ +From 2d6acef676d35611dc58ca9c3bac51789adbcce8 Mon Sep 17 00:00:00 2001 +From: Remi Gacogne +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 + diff --git a/python-bottle.spec b/python-bottle.spec index 62725d283d6b864e0df5a6cdbd76a6f19510f11c..6f770c5c2fef71fd37164b65728f8a8aede489cd 100644 --- a/python-bottle.spec +++ b/python-bottle.spec @@ -1,6 +1,6 @@ Name: python-bottle Version: 0.12.13 -Release: 16 +Release: 17 Summary: WSGI micro web-framework for Python. License: MIT URL: https://github.com/bottlepy/bottle @@ -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: python3-devel python3-setuptools @@ -51,6 +52,9 @@ sed -i '/^#!/d' bottle.py %exclude %{_bindir}/bottle.py %changelog +* Fri Dec 29 2023 zhangliangpengkun - 0.12.13-17 +- Fix the Allow: header value in 405 "Method not allowed." response. + * Tue Dec 26 2023 zhangliangpengkun - 0.12.13-16 - Bug fix of missing regex escaped back slashes