You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are indeed facing problems while performing GET requests to external services that do not allow Content-Length in such requests. Thanks for checking this!
@violetagg We are using the Netty HttpClient via Spring WebClient and with Spring Boot 3.4.1 we started to face GET requests failing when calling external services we don't own because of the inclusion of "Content-Length: 0" as a header.
Checking the HTTP Semantics, it seems that "A user agent SHOULD NOT send a Content-Length header field when the request message does not contain content and the method semantics do not anticipate such data." (in https://httpwg.org/specs/rfc9110.html#field.content-length). It is "SHOULD NOT" and not "MUST NOT", but maybe it is safer not to include the header by default in GET requests with no body.
We would be happy if we could avoid the Content-Length header being added, but so far we found no way of doing that.
As part of an upgrade from Reactor Netty
1.0.48
to1.2.1
we found a slight behavioral change to when Reactor Netty addsContent-Length: 0
.Using this simple reproduction:
We found the headers logged by the HTTP server changed slightly.
1.0.48
1.2.1
I don't hold a strong opinion on the correct behavior here and more so wanted to share this information in case this causes a problem for anyone else.
The text was updated successfully, but these errors were encountered: