Thanks to visit codestin.com
Credit goes to github.com

Skip to content

headersSplitValues doesn't handle set-cookie correctly when header is camel case Set-Cookie #1419

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
laishere opened this issue Dec 10, 2024 · 3 comments
Labels
needs-info Additional information needed from the issue author package:http type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@laishere
Copy link

if (key == 'set-cookie') {
headersWithFieldLists[key] = value.split(_setCookieSplitter);
} else {
headersWithFieldLists[key] = value.split(_headerSplitter);
}

We should use key.toLowerCase() == 'set-cookie' instead.

@laishere laishere added package:http type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Dec 10, 2024
@seifibrahim32
Copy link

@brianquinlan Also, I will see this.

@brianquinlan
Copy link
Collaborator

Hi @laishere

Do you have any code that can reproduce this? Response.headers should only contain lowercase keys so my expectation is that this should work.

@brianquinlan brianquinlan added the needs-info Additional information needed from the issue author label May 2, 2025
@laishere
Copy link
Author

laishere commented May 2, 2025

It seems the camel case header key is from my test code. Can't reproduce it on both dart and flutter. Will close it now. Thanks!

@laishere laishere closed this as completed May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-info Additional information needed from the issue author package:http type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants