mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
ef77b4064f
This change avoids the trap of creating a copy of `HttpHeaders` using a case-sensitive `MultiValueMap` by mistake. Since mutability is always desirable, we make a mutable copy by using `addAll` on an empty `HttpHeaders`. We can't simply rely on HttpHeaders' map-based constructor to detect read-only header in this particular case, because the container's original headers representation might in some cases be read-only. Closes gh-33666