Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix disabling of location header autocorrect for werkzeug 2+ #649

Closed

Conversation

AdamWill
Copy link
Contributor

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 awilliam@redhat.com

…labs#647)

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 <awilliam@redhat.com>
@AdamWill
Copy link
Contributor Author

Fixes #647

@MikeRalphson
Copy link

@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

@AdamWill
Copy link
Contributor Author

Closing in favor of #674 , as setting both isn't valid any more (plus this wasn't doing it entirely right).

@AdamWill AdamWill closed this Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants