Skip to content

fix(http): preserve all headers from Headers object #57802

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

Conversation

jnizet
Copy link
Contributor

@jnizet jnizet commented Sep 13, 2024

when initialized from a Headers object containing multiple values for the same header, HttpHeaders now contains all the header values instead of only having one of them.

Fixes #57798

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

When initialized from a Headers object containing multiple values for the same header, HttpHeaders contained only one of the header values.

Issue Number: #57798

What is the new behavior?

It now contains all the header values, as in the original Headers object.

Does this PR introduce a breaking change?

  • Yes
  • No

(It does change the behavior of the HttpHeaders class, which might cause behavior changes in existing code, but the old behavior was a bug).

@pullapprove pullapprove bot requested a review from dylhunn September 13, 2024 07:45
@pkozlowski-opensource pkozlowski-opensource added the area: common/http Issues related to HTTP and HTTP Client label Sep 13, 2024
@ngbot ngbot bot added this to the Backlog milestone Sep 13, 2024
@alan-agius4 alan-agius4 added the action: review The PR is still awaiting reviews from at least one requested reviewer label Sep 19, 2024
Copy link
Member

@JoostK JoostK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit, otherwise LGTM.

@alxhub alxhub added action: merge The PR is ready for merge by the caretaker target: major This PR is targeted for the next major release and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Sep 24, 2024
when initialized from a `Headers` object containing multiple values for the same header, `HttpHeaders` now contains all the header values instead of only having one of them.

Fixes angular#57798
@jnizet jnizet force-pushed the fix/57798-multiple-headers branch from f407bee to 44d7747 Compare September 25, 2024 05:50
@angular-robot angular-robot bot removed the area: common/http Issues related to HTTP and HTTP Client label Sep 25, 2024
@ngbot ngbot bot removed this from the Backlog milestone Sep 25, 2024
@pkozlowski-opensource pkozlowski-opensource added the area: common/http Issues related to HTTP and HTTP Client label Sep 25, 2024
@ngbot ngbot bot added this to the Backlog milestone Sep 25, 2024
@AndrewKushnir AndrewKushnir removed the request for review from dylhunn September 26, 2024 03:03
@devversion
Copy link
Member

This PR was merged into the repository by commit 057cf7f.

The changes were merged into the following branches: main

@devversion devversion closed this in 057cf7f Oct 1, 2024
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: common/http Issues related to HTTP and HTTP Client target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HttpHeaders class discards multiple 'Set-Cookie' headers
6 participants