NullPointerException is thrown if WebClient is used with Apache Httpclient and cookies are disabled. #34132
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: waiting-for-triage
An issue we've not yet triaged or decided on
Running this unit test:
(note the disableCookieManagement() option)
throws this exception:
When cookies are disabled, it seems there is no CookieSpec in the context here:
https://github.com/spring-projects/spring-framework/blob/v6.2.1/spring-web/src/main/java/org/springframework/http/client/reactive/HttpComponentsClientHttpResponse.java#L72
so the exception happens here:
https://github.com/spring-projects/spring-framework/blob/v6.2.1/spring-web/src/main/java/org/springframework/http/client/reactive/HttpComponentsClientHttpResponse.java#L79
I assume this is a legitimate use case? In the case of a null CookieSpec, an empty map could be returned.
The text was updated successfully, but these errors were encountered: