Skip to content

Commit

Permalink
Merge #3602 into 1.2.3
Browse files Browse the repository at this point in the history
Signed-off-by: Violeta Georgieva <[email protected]>
  • Loading branch information
violetagg committed Jan 22, 2025
2 parents 5c13d79 + c9e142e commit 4b5aaf1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,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 @@ -1085,7 +1085,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 4b5aaf1

Please sign in to comment.