Skip to content

HTTPClient: Support concatenation of headers #6183

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

Closed
wants to merge 1 commit into from
Closed

HTTPClient: Support concatenation of headers #6183

wants to merge 1 commit into from

Conversation

mattsches1
Copy link
Contributor

Summary

Adds support for multiple response headers with identical keys; the main goal is to support setting several cookies requested by a server, which result in several "set-cookie" response headers.

Impact

If several headers with the same key are received in a response, they are concatenated using commas.

Related links

@CLAassistant
Copy link

CLAassistant commented Jan 28, 2022

CLA assistant check
All committers have signed the CLA.

@me-no-dev
Copy link
Member

Could this be made to work with particular headers only? set-cookie in your case?

@mattsches1
Copy link
Contributor Author

It could, but if I'm honest, I don't really see a point in it. And I thought aligning this with the ESP8266 implementation (from where I actually copied the code snippet) would be sensible,

But I was actually looking into a solution to handle cookies in the client and found the header concatenation would not really solve that (or require too much efforts around for my taste). In the meantime, I therefore implemented a cookie jar to enable the client to properly handle cookies. Just created a pull request for this: https://github.com/espressif/arduino-esp32/pull/6216

Feel free to discard any of these if they don't fit for whatever reason.

@me-no-dev
Copy link
Member

Closing in favor of #6216

@me-no-dev me-no-dev closed this Feb 4, 2022
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.

Multible http response headers with the same name get overwritten
3 participants