httpbin
httpbin copied to clipboard
Fix disabling of location header autocorrect for werkzeug 2+
In werkzeug 2.0.0 and later, the Location header autocorrection
moved from BaseResponse to Response, so we need to set
autocorrect_location_header = False
in Response
not
BaseResponse
. For now let's just set it in both to be safe,
this doesn't cause any errors at least with 1.0.1 and 2.0.1.
Signed-off-by: Adam Williamson [email protected]
Fixes #647
@kinlane This PR is a pre-requisite for getting the tests running again when we move them to GitHub Actions - see https://github.com/MikeRalphson/httpbin/actions/runs/1174257560
Closing in favor of #674 , as setting both isn't valid any more (plus this wasn't doing it entirely right).