* update httpbin to 0.7.0-13
This commit is contained in:
parent
b13b0a0759
commit
3695559057
@ -3,21 +3,26 @@
|
||||
|
||||
pkgname=httpbin
|
||||
pkgver=0.7.0
|
||||
pkgrel=12
|
||||
pkgrel=13
|
||||
pkgdesc="HTTP Request and Response Service"
|
||||
arch=(any)
|
||||
url="https://github.com/requests/httpbin"
|
||||
license=('MIT')
|
||||
depends=('python-flask' 'python-markupsafe' 'python-decorator' 'python-itsdangerous' 'python-six'
|
||||
'python-brotli' 'python-werkzeug')
|
||||
depends=('python' 'python-flask' 'python-decorator' 'python-six'
|
||||
'python-brotli' 'python-werkzeug'
|
||||
# Not directly used. Most likely added to setup.py as they are indirect dependencies
|
||||
# https://github.com/postmanlabs/httpbin/commit/2131d8e2676a03a1077a5ef90747accb299f51fa
|
||||
'python-markupsafe' 'python-itsdangerous')
|
||||
makedepends=('python-setuptools')
|
||||
source=("$pkgname-$pkgver.tar.gz::https://github.com/requests/httpbin/archive/v$pkgver.tar.gz"
|
||||
httpbin-werkzeug-0.15.1.patch
|
||||
httpbin-werkzeug-2.1.0.patch
|
||||
httpbin-werkzeug-2.3.0.patch
|
||||
remove-raven.patch)
|
||||
sha512sums=('faec48a0a2ac8800293b10281966a28195884ad2f69f0f28f1b8c8e1a7bfd8933ebbc9b541c80cdc19e1031a8ba9383afe8e372b9044436cb307dd1e8eddaae7'
|
||||
'3c058ca5f685e281f7d60216de844e58727e7677766660df410ec57d8c985485cf611ec64eb71a234bdd49b4fdf66be6138d4bb7258d9e6d0346d6c6ee9f3cdf'
|
||||
'297902e60a529ad9b7c3ad1cc36a2c958505a0a15bc1e0210cb365a6a4d9dffcde793dad0b426ab14b0f312cd3d9fa34a6662040d665dd5177376a8583945789'
|
||||
'a4ea7d047108e028bb1eed16b51e9c937fdc7f622a7f49495769b63fb4913fcccbfb6e0f94da82e14d1571cfefeee1b4635002ba7c9cb44ce99cf57c690b5907'
|
||||
'757db19d3ded4806423f3361b5d30c962d8a72a9b3bf6afb26770f3fc56c14554c8fc6aa1a6ce72328fd8c77c330c5d0d05478d345c287f07e22302ccf1ec8d3')
|
||||
|
||||
prepare() {
|
||||
@ -26,6 +31,11 @@ prepare() {
|
||||
# patch taken from https://github.com/maximino-dev/httpbin/commit/651c03a73072b9f399bbb80741ab473fc8b0adbb,
|
||||
# which is the latest version of https://github.com/postmanlabs/httpbin/pull/674 as of 2022/11/13
|
||||
patch -p1 -i ../httpbin-werkzeug-2.1.0.patch
|
||||
# * For WWWAuthenticate, passing a bool to stale.setter is deprecated since [1]. Actually, stale.setter is not used as __setattr__ takes precedence.
|
||||
# * Support for bytes is deprecated since [2]. Actually, using bytes results in an exception in some cases.
|
||||
# [1] https://github.com/pallets/werkzeug/pull/2619
|
||||
# [2] https://github.com/pallets/werkzeug/pull/2641
|
||||
patch -p1 -i ../httpbin-werkzeug-2.3.0.patch
|
||||
# raven is unmaintained and httpbin removed it already, but no release was made
|
||||
patch -p1 -i ../remove-raven.patch
|
||||
sed -i 's/brotlipy/Brotli/g' setup.py
|
||||
|
25
python/httpbin/httpbin-werkzeug-2.3.0.patch
Normal file
25
python/httpbin/httpbin-werkzeug-2.3.0.patch
Normal file
@ -0,0 +1,25 @@
|
||||
diff --git a/test_httpbin.py b/test_httpbin.py
|
||||
index b7104ff..eb21e61 100755
|
||||
--- a/test_httpbin.py
|
||||
+++ b/test_httpbin.py
|
||||
@@ -170,7 +168,7 @@ class HttpbinTestCase(unittest.TestCase):
|
||||
def test_base64(self):
|
||||
greeting = u'Здравствуй, мир!'
|
||||
b64_encoded = _string_to_base64(greeting)
|
||||
- response = self.app.get(b'/base64/' + b64_encoded)
|
||||
+ response = self.app.get('/base64/' + b64_encoded.decode('ascii'))
|
||||
content = response.data.decode('utf-8')
|
||||
self.assertEqual(greeting, content)
|
||||
|
||||
diff --git a/httpbin/helpers.py b/httpbin/helpers.py
|
||||
index b29e183..d5d05b9 100644
|
||||
--- a/httpbin/helpers.py
|
||||
+++ b/httpbin/helpers.py
|
||||
@@ -469,6 +469,6 @@ def digest_challenge_response(app, qop, algorithm, stale = False):
|
||||
auth = WWWAuthenticate("digest")
|
||||
auth.set_digest('me@kennethreitz.com', nonce, opaque=opaque,
|
||||
qop=('auth', 'auth-int') if qop is None else (qop,), algorithm=algorithm)
|
||||
- auth.stale = stale
|
||||
+ auth.stale = 'TRUE' if stale else 'FALSE'
|
||||
response.headers['WWW-Authenticate'] = auth.to_header()
|
||||
return response
|
Loading…
x
Reference in New Issue
Block a user