Skip to content

Commit

Permalink
When null is provided as a deferred configuration, continue with the …
Browse files Browse the repository at this point in the history
…current configuration (#3602)

Signed-off-by: Violeta Georgieva <[email protected]>
  • Loading branch information
violetagg authored Jan 22, 2025
1 parent 8bc0951 commit c9e142e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ public final HttpClient cookiesWhen(String name, Function<? super Cookie, Mono<?
HttpClient dup = duplicate();
dup.configuration().deferredConf(config -> {
Mono<? extends Cookie> mono = cookieBuilder.apply(new DefaultCookie(name, ""));
return mono == Mono.<Cookie>empty() ?
return mono == null || mono == Mono.<Cookie>empty() ?
Mono.just(config) :
mono.map(c -> {
if (!c.value().isEmpty()) {
Expand Down Expand Up @@ -1061,7 +1061,7 @@ public final HttpClient headersWhen(Function<? super HttpHeaders, Mono<? extends
HttpClient dup = duplicate();
dup.configuration().deferredConf(config -> {
Mono<? extends HttpHeaders> mono = headerBuilder.apply(config.headers.copy());
return mono == Mono.<HttpHeaders>empty() ?
return mono == null || mono == Mono.<HttpHeaders>empty() ?
Mono.just(config) :
mono.map(h -> {
config.headers = h;
Expand Down

0 comments on commit c9e142e

Please sign in to comment.