This repository has been archived by the owner on May 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgpkg: httpbin 0.7.0-9; compatibility with python-werkzeug >= 2.1.0
Keeping compatibility with older werkzeug can be quite complicated, so I decided to only consider the latest werkzeug and use the simplest patch. The patch httpbin-werkzeug-2.0.0.patch is no longer needed, as it fixes the same issue as httpbin-werkzeug-2.1.0.patch: `autocorrect_location_header` not set on the correct class. Fixes https://bugs.archlinux.org/task/74443 See: postmanlabs/httpbin#674 git-svn-id: file:///srv/repos/svn-community/svn@1186428 9fca08f4-af9d-4005-b8df-a31f2cc04f65
- Loading branch information
yan12125
authored and
svntogit
committed
Apr 15, 2022
1 parent
674df0c
commit 366ab72
Showing
3 changed files
with
38 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
From 5cc81ce87a3c447a127e4a1a707faf9f3b1c9b6b Mon Sep 17 00:00:00 2001 | ||
From: Maximino BOGADO <bogamax2@hotmail.fr> | ||
Date: Wed, 30 Mar 2022 16:26:31 +0200 | ||
Subject: [PATCH] Replace BaseResponse to Response class (new werkzeug version | ||
2.1.0) | ||
|
||
--- | ||
httpbin/core.py | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/httpbin/core.py b/httpbin/core.py | ||
index 305c9882..2bad408e 100644 | ||
--- a/httpbin/core.py | ||
+++ b/httpbin/core.py | ||
@@ -29,7 +29,7 @@ | ||
from six.moves import range as xrange | ||
from werkzeug.datastructures import WWWAuthenticate, MultiDict | ||
from werkzeug.http import http_date | ||
-from werkzeug.wrappers import BaseResponse | ||
+from werkzeug.wrappers import Response | ||
from werkzeug.http import parse_authorization_header | ||
from flasgger import Swagger, NO_SANITIZER | ||
|
||
@@ -77,7 +77,7 @@ def jsonify(*args, **kwargs): | ||
|
||
|
||
# Prevent WSGI from correcting the casing of the Location header | ||
-BaseResponse.autocorrect_location_header = False | ||
+Response.autocorrect_location_header = False | ||
|
||
# Find the correct template folder when running from a different location | ||
tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "templates") |