mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-10-03 05:19:07 +00:00
Prior to this commit, the `DefaultClientResponseBuilder` would assume that an original client HTTP response, when mutated, would not be reused nor read anymore. While this is the advised use case, there was some inconsistency with the builder API here when mutating: some data like the response status would copied, but the HTTP headers and cookies would refer directly to the previous entries, making all changes visible to the previous response instance. This commit ensures that deep copies are performed when mutating a client response with the builder API. Fixes gh-37086