-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
support of relative "Location: " for redirect headers #109
Comments
The fix mentionned at the end of the commit has been merged in master. Previous questions remains to be answered. |
This is now possible with 0.8 by overriding an attribute on the response. |
I'm completing your answer which is a little bit short. A "autocorrect_location_header" attribute is now available in the BaseResponse object can be set to False to avoid enforcing RFC and allow non-absolute "Location: " Thanks a lot. |
Werkzeug ensures that "Location:" header is absolute:
https://github.com/mitsuhiko/werkzeug/blob/master/werkzeug/wrappers.py#L958
But why not offer the option to keep it relative. Even if this is not HTTP compliant, it seems supported by all the browser out there. And it allows HTTPS proxying (for example) which current implementation fails to support when using
utils.redirect()
for example.This discussion started here (about openerp-web new implementation that uses werkzeug in place of CherryPy):
https://code.launchpad.net/~vaab/openerp-web/proxy-mode-option/+merge/75972
A fix for HTTPS proxying (keeping absolute URL in Location) is also proposed in: #106
What are your thoughts on this topic ?
The text was updated successfully, but these errors were encountered: