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
Add 308 Redirect #151
Comments
Hey I saw this, but was busy this week, will add today. Thanks for keeping up with HTTP completeness. |
…irect - invalidate cache after request per RFC2616 Section 13.10 before: `method not in ["GET", "HEAD"]` now: `method in h.invalidate_methods`, default: DELETE,POST,PUT - 308 may be cached not by default as per RFC7538, but only with relevant headers - Http new attributes: safe_methods, invalidate_methods are public API, type is anything with `contains` operator, tuple is recommended. Defaults are in upper case module level constants. As of 2019-12-19, SAFE_METHODS only include GET,HEAD to minimise problems from changing much behavior at once. Please, expect default SAFE_METHODS to become GET,HEAD,OPTIONS,TRACE as per RFC7231. #151
…irect - support 308 permanent redirect with same method - Http() new attribute, `safe_methods` is public API, type is anything with `contains` operator, tuple is recommended. Defaults are GET,HEAD,OPTIONS,TRACE as per RFC7231. - invalidate cache after request per RFC2616 Section 13.10 before: `method not in ["GET", "HEAD"]` now: `method not in ["GET", "HEAD", "OPTIONS", "TRACE"]` and adjustable - 308 may be cached not by default as per RFC7538, but only with relevant headers #151
…irect - support 308 permanent redirect with same method - Http() new attribute, `safe_methods` is public API, type is anything with `contains` operator, tuple is recommended. Defaults are GET,HEAD,OPTIONS,TRACE as per RFC7231. - invalidate cache after request per RFC2616 Section 13.10 before: `method not in ["GET", "HEAD"]` now: `method not in ["GET", "HEAD", "OPTIONS", "TRACE"]` and adjustable - 308 may be cached not by default as per RFC7538, but only with relevant headers #151
…irect - support 308 permanent redirect with same method - Http() new attribute, `safe_methods` is public API, type is anything with `contains` operator, tuple is recommended. Defaults are GET,HEAD,OPTIONS,TRACE as per RFC7231. - invalidate cache per https://tools.ietf.org/html/rfc7234#section-4.4 before: `method not in [GET, HEAD]` now: `method not in [GET, HEAD, OPTIONS, TRACE]` and adjustable - 308 may be cached not by default as per RFC7538, but only with relevant headers #151
@slavkoja please, try this
|
Seems to work, while i didn't install it via pip. Simple debug output, only hostname changed, the URL is redirected from HTTP to HTTPS via 308 code:
thanks |
Merged in master. Have a great time. |
Please add 308 code to redirect codes.
The 308 code is defined as permanent redirect, which preservers POST method, see RFC 7538.
thanks
The text was updated successfully, but these errors were encountered: