All projects

Upstream commits

spring-framework

spring-projects/spring-framework

View on GitHub

1 commit

  1. Deep copy default headers, cookies in client builders
    Prior to this commit, the copy constructors of DefaultRestClientBuilder, DefaultWebClientBuilder and DefaultWebTestClientBuilder copied the default headers and cookies maps but shared their value lists. Adding a value under an existing name on a builder returned by clone() or mutate() therefore also changed the builder it was copied from, as well as every builder later returned by mutate() on the same client. DefaultWebTestClientBuilder#build() also handed read-only views of its live maps to the built client, so later changes to the builder leaked into clients that were already built. This commit copies the value lists in the copy constructors, as build() already does for RestClient and WebClient, and in DefaultWebTestClientBuilder#build().

Updated daily, last on 2026-11-16. By Christian Aurich Zanettini Martins · All projects