-
Notifications
You must be signed in to change notification settings - Fork 13.3k
optionally allow redirects on HTTPClient & OTA updates #5009
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
optionally allow redirects on HTTPClient & OTA updates #5009
Conversation
…inInternal parses URL, sets ports Added HTTPRedirect example.
Redirection code is currently handled in |
only GET and HEAD requests are currently handled automatically Redirects that fail to be automatically handled return the redirect code as before
@d-a-v Its still a work in progress but its functional. Before I clean up a few optional TBDs I want to see what others think. Also I'm thinking of allowing redirects for POST requests by turning them into GET requests at the new location if redirects are enabled. (https://en.wikipedia.org/wiki/Post/Redirect/Get) |
@d-a-v Updated. Added support for POST 303 redirect. Also added device tests for various redirect features. |
…bman/Arduino into feature/http_update_follow_redirects
@d-a-v any more changes needed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing noteworthy jumps out at me code-wise.
Approved.
Support is disabled by default. Call
ESPhttpUpdate.followRedirects(true);
to enable.