Compare commits
No commits in common. "56e21a605ac55700ed65c5b5c98ff860bd259fd5" and "4322cd7b0362d481ce029db47614c1f280e2b57b" have entirely different histories.
56e21a605a
...
4322cd7b03
@ -1,24 +0,0 @@
|
|||||||
From e1be22df61b9d545b7af3d8990603f4782eecced Mon Sep 17 00:00:00 2001
|
|
||||||
From: Alice Goldfuss <alice@newrelic.com>
|
|
||||||
Date: Tue, 11 Feb 2014 17:14:26 -0800
|
|
||||||
Subject: [PATCH] Fix for Issue #586
|
|
||||||
|
|
||||||
---
|
|
||||||
bottle.py | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/bottle.py b/bottle.py
|
|
||||||
index 406762f..04ccf7d 100644
|
|
||||||
--- a/bottle.py
|
|
||||||
+++ b/bottle.py
|
|
||||||
@@ -2689,6 +2689,7 @@ def auth_basic(check, realm="private", text="Access denied"):
|
|
||||||
''' Callback decorator to require HTTP auth (basic).
|
|
||||||
TODO: Add route(check_auth=...) parameter. '''
|
|
||||||
def decorator(func):
|
|
||||||
+ @functools.wraps(func)
|
|
||||||
def wrapper(*a, **ka):
|
|
||||||
user, password = request.auth or (None, None)
|
|
||||||
if user is None or not check(user, password):
|
|
||||||
--
|
|
||||||
2.39.0.windows.2
|
|
||||||
|
|
||||||
@ -1,46 +0,0 @@
|
|||||||
From 888aa8e7b8f6490015463ee370ff4026fc951b1f Mon Sep 17 00:00:00 2001
|
|
||||||
From: 06180339 <mlrst@web.de>
|
|
||||||
Date: Sat, 28 Jan 2017 23:29:29 +0100
|
|
||||||
Subject: [PATCH] Add ServerAdapter for CherryPy >= 9
|
|
||||||
|
|
||||||
Since CherryPy >= 9, the server part of CherryPy has been extracted and named Cheroot. Thus the old CherryPy ServerAdapter does not work for CherryPy >= 9: the import fails, and the SSL part should be different too. Cheroot can be installed (git install cheroot) without CherryPy so that we can just have a CherootServer adapter in addition to the CherryPyServer adapter for the older versions.
|
|
||||||
|
|
||||||
(cherry picked from commit b9229eef97ea246e3d0e0c455071d54435a1557d)
|
|
||||||
Signed-off-by: Juerg Haefliger <juergh@protonmail.com>
|
|
||||||
---
|
|
||||||
bottle.py | 19 +++++++++++++++++++
|
|
||||||
1 file changed, 19 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/bottle.py b/bottle.py
|
|
||||||
index 04ccf7d..73886a2 100644
|
|
||||||
--- a/bottle.py
|
|
||||||
+++ b/bottle.py
|
|
||||||
@@ -2816,6 +2816,25 @@ class CherryPyServer(ServerAdapter):
|
|
||||||
server.stop()
|
|
||||||
|
|
||||||
|
|
||||||
+class CherootServer(ServerAdapter):
|
|
||||||
+ def run(self, handler): # pragma: no cover
|
|
||||||
+ from cheroot import wsgi
|
|
||||||
+ from cheroot.ssl import builtin
|
|
||||||
+ self.options['bind_addr'] = (self.host, self.port)
|
|
||||||
+ self.options['wsgi_app'] = handler
|
|
||||||
+ certfile = self.options.pop('certfile', None)
|
|
||||||
+ keyfile = self.options.pop('keyfile', None)
|
|
||||||
+ chainfile = self.options.pop('chainfile', None)
|
|
||||||
+ server = wsgi.Server(**self.options)
|
|
||||||
+ if certfile and keyfile:
|
|
||||||
+ server.ssl_adapter = builtin.BuiltinSSLAdapter(
|
|
||||||
+ certfile, keyfile, chainfile)
|
|
||||||
+ try:
|
|
||||||
+ server.start()
|
|
||||||
+ finally:
|
|
||||||
+ server.stop()
|
|
||||||
+
|
|
||||||
+
|
|
||||||
class WaitressServer(ServerAdapter):
|
|
||||||
def run(self, handler):
|
|
||||||
from waitress import serve
|
|
||||||
--
|
|
||||||
2.39.0.windows.2
|
|
||||||
|
|
||||||
@ -1,41 +0,0 @@
|
|||||||
From a3ba0eb30e7becdfe0eb83dc2babaa40847cd7d0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Marcel Hellkamp <marc@gsites.de>
|
|
||||||
Date: Sat, 25 Mar 2017 17:59:26 +0100
|
|
||||||
Subject: [PATCH] Added 'cheroot' server adapter to list of server names, so it
|
|
||||||
can be selected from the command line and by name.
|
|
||||||
|
|
||||||
Alos added cheroot after cherrypy in the 'auto' adapter to make it future proof.
|
|
||||||
|
|
||||||
(backported from commit 617d08a2ccca95b2e8668fef7057127049595fd9)
|
|
||||||
[juergh: Adjust context.]
|
|
||||||
Signed-off-by: Juerg Haefliger <juergh@protonmail.com>
|
|
||||||
---
|
|
||||||
bottle.py | 5 ++++-
|
|
||||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/bottle.py b/bottle.py
|
|
||||||
index 73886a2..11121b8 100644
|
|
||||||
--- a/bottle.py
|
|
||||||
+++ b/bottle.py
|
|
||||||
@@ -3002,7 +3002,9 @@ class BjoernServer(ServerAdapter):
|
|
||||||
|
|
||||||
class AutoServer(ServerAdapter):
|
|
||||||
""" Untested. """
|
|
||||||
- adapters = [WaitressServer, PasteServer, TwistedServer, CherryPyServer, WSGIRefServer]
|
|
||||||
+ adapters = [WaitressServer, PasteServer, TwistedServer, CherryPyServer,
|
|
||||||
+ CherootServer, WSGIRefServer]
|
|
||||||
+
|
|
||||||
def run(self, handler):
|
|
||||||
for sa in self.adapters:
|
|
||||||
try:
|
|
||||||
@@ -3016,6 +3018,7 @@ server_names = {
|
|
||||||
'wsgiref': WSGIRefServer,
|
|
||||||
'waitress': WaitressServer,
|
|
||||||
'cherrypy': CherryPyServer,
|
|
||||||
+ 'cheroot': CherootServer,
|
|
||||||
'paste': PasteServer,
|
|
||||||
'fapws3': FapwsServer,
|
|
||||||
'tornado': TornadoServer,
|
|
||||||
--
|
|
||||||
2.39.0.windows.2
|
|
||||||
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
From f0e6bc556dafe217c5612a06712bcf47c88ea5a2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Marcel Hellkamp <marc@gsites.de>
|
|
||||||
Date: Sun, 12 Jun 2022 18:55:19 +0200
|
|
||||||
Subject: [PATCH] fix: Cookie test falsely reports a failure for some python
|
|
||||||
versions.
|
|
||||||
|
|
||||||
---
|
|
||||||
test/test_environ.py | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/test/test_environ.py b/test/test_environ.py
|
|
||||||
index 3a9878a..9680dd1 100755
|
|
||||||
--- a/test/test_environ.py
|
|
||||||
+++ b/test/test_environ.py
|
|
||||||
@@ -624,7 +624,7 @@ class TestResponse(unittest.TestCase):
|
|
||||||
response.delete_cookie('name')
|
|
||||||
cookies = [value for name, value in response.headerlist
|
|
||||||
if name.title() == 'Set-Cookie']
|
|
||||||
- self.assertTrue('name=;' in cookies[0])
|
|
||||||
+ self.assertTrue('name=;' in cookies[0] or 'name="";' in cookies[0])
|
|
||||||
|
|
||||||
def test_set_header(self):
|
|
||||||
response = BaseResponse()
|
|
||||||
--
|
|
||||||
2.39.0.windows.2
|
|
||||||
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
From ef7b678bda31b9d5c3f7f4cffcdcf14137b4cdad Mon Sep 17 00:00:00 2001
|
|
||||||
From: Marcel Hellkamp <marc@gsites.de>
|
|
||||||
Date: Sun, 12 Jun 2022 20:54:46 +0200
|
|
||||||
Subject: [PATCH] fix: view decorator does not forward default values if route
|
|
||||||
result is None
|
|
||||||
|
|
||||||
---
|
|
||||||
bottle.py | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/bottle.py b/bottle.py
|
|
||||||
index 2266801..ed3076c 100644
|
|
||||||
--- a/bottle.py
|
|
||||||
+++ b/bottle.py
|
|
||||||
@@ -3682,7 +3682,7 @@ def view(tpl_name, **defaults):
|
|
||||||
tplvars.update(result)
|
|
||||||
return template(tpl_name, **tplvars)
|
|
||||||
elif result is None:
|
|
||||||
- return template(tpl_name, defaults)
|
|
||||||
+ return template(tpl_name, **defaults)
|
|
||||||
return result
|
|
||||||
return wrapper
|
|
||||||
return decorator
|
|
||||||
--
|
|
||||||
2.39.0.windows.2
|
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: python-bottle
|
Name: python-bottle
|
||||||
Version: 0.12.13
|
Version: 0.12.13
|
||||||
Release: 22
|
Release: 17
|
||||||
Summary: WSGI micro web-framework for Python.
|
Summary: WSGI micro web-framework for Python.
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://bottlepy.org
|
URL: http://bottlepy.org
|
||||||
@ -16,11 +16,6 @@ Patch0006: 0005-fix-1148-redirect-and-non-ascii-characters.patch
|
|||||||
Patch0007: 0006-1177-Bug-fix-of-missing-regex-escaped-back-slashes.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
|
Patch0008: 0007-Fix-the-Allow-header-value-in-405-Method-not-allowed.patch
|
||||||
Patch0009: 0008-Fix-Multipart-file-uploads-with-empty-filename-not-d.patch
|
Patch0009: 0008-Fix-Multipart-file-uploads-with-empty-filename-not-d.patch
|
||||||
Patch0010: 0009-Fix-for-Issue-586.patch
|
|
||||||
Patch0011: 0010-Add-ServerAdapter-for-CherryPy-9.patch
|
|
||||||
Patch0012: 0011-Added-cheroot-server-adapter-to-list-of-server-names.patch
|
|
||||||
Patch0013: 0012-fix-Cookie-test-falsely-reports-a-failure-for-some-p.patch
|
|
||||||
Patch0014: 0013-fix-view-decorator-does-not-forward-default-values-i.patch
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python2-devel python2-setuptools python3-devel python3-setuptools
|
BuildRequires: python2-devel python2-setuptools python3-devel python3-setuptools
|
||||||
|
|
||||||
@ -75,21 +70,6 @@ sed -i '/^#!/d' bottle.py
|
|||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Feb 28 2024 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 0.12.13-22
|
|
||||||
- fix: view decorator does not forward default values if route result is None
|
|
||||||
|
|
||||||
* Tue Jan 30 2024 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 0.12.13-21
|
|
||||||
- fix: Cookie test falsely reports a failure for some python versions.
|
|
||||||
|
|
||||||
* Tue Jan 23 2024 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 0.12.13-20
|
|
||||||
- Added 'cheroot' server adapter to list of server names, so it can be selected from the command line and by name.
|
|
||||||
|
|
||||||
* Thu Jan 18 2024 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 0.12.13-19
|
|
||||||
- Add ServerAdapter for CherryPy >= 9
|
|
||||||
|
|
||||||
* Fri Jan 12 2024 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 0.12.13-18
|
|
||||||
- The auth_basic() decorator doesn't use functools.wraps().
|
|
||||||
|
|
||||||
* Fri Jan 05 2024 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 0.12.13-17
|
* Fri Jan 05 2024 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 0.12.13-17
|
||||||
- Fix: Multipart file uploads with empty filename not detected as binary.
|
- Fix: Multipart file uploads with empty filename not detected as binary.
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user