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

Don't clear custom HTTP headers on redirect in HTTPClient #5973

Merged
merged 1 commit into from Dec 14, 2021

Conversation

wojtekka
Copy link
Contributor

@wojtekka wojtekka commented Dec 4, 2021

Summary

Current implementation clears _headers when request was sent. If the user added custom request headers, they will be lost and the redirected request will not contain them. This commit changes the scope of cleanup (moved from beginInternal() to begin(), changed the amount of data cleared in handleHeaderResponse()), so that the headers survive redirects but don't survive connection reuse.

Impact

Possible impact on connection reuse. Tested manually to behave properly.

Current implementation clears _headers when request was sent. If the
user added custom request headers, they will be lost and the redirected
request will not contain them. This commit changes the scope of cleanup
so that the headers survive redirects but don't survive connection
reuse.
@CLAassistant
Copy link

CLAassistant commented Dec 4, 2021

CLA assistant check
All committers have signed the CLA.

@me-no-dev me-no-dev merged commit cb25fe8 into espressif:master Dec 14, 2021
@me-no-dev
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants