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

Added API to haxe.Http for multiple response headers with same name. #10812

Merged
merged 1 commit into from
Nov 8, 2022

Conversation

23rd
Copy link
Contributor

@23rd 23rd commented Oct 2, 2022

As was reported here (#3550) there are situations when an endpoint returns multiple response headers with the same name (e.g. Set-Cookie) and these headers (except the last one) became unreachable.
So this PR adds a new method getResponseHeaderValues (suggested by @RealyUniqueName from #9053 (comment)) to a public API of the haxe.Http class.

This implementation of the method is trying to avoid an overhead allocation when it is possible: if an endpoint returns only single headers then responseHeadersSameKey will not be allocated and will keep a null state.

If you have any suggestions or remarks I would be happy to update my commit.

@skial skial mentioned this pull request Oct 5, 2022
1 task
@Jarrio
Copy link

Jarrio commented Nov 4, 2022

Bump

@Simn
Copy link
Member

Simn commented Nov 8, 2022

This looks pretty awkward, but I don't really know how else to handle this situation.

@Simn Simn merged commit dade20c into HaxeFoundation:development Nov 8, 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.

3 participants