Clients created using JdkClientHttpRequestFactory set content-length for GET, DELETE and HEAD requests · Issue #34971 · spring-projects/spring-framework · GitHub
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
This results in creating a GET request without a body.
This however isn't internally the same as not setting publisher at all (openjdk/jdk@6a77093).
Unfortunately you must always pass the published for this method. While you could file a bug against JDK, getting a fix will take far longer than addressing this in Spring.
I believe what is required is to change Spring's algorithm to something that checks if there is a body and if the request method is one of GET, DELETE, or HEAD. If it is, then one should call matching method in the request builder.