Re: RFR: 8283544: HttpClient GET method adds Content-Length: 0 header [v3]

2022-03-30 Thread Michael McMahon
On Tue, 29 Mar 2022 19:43:50 GMT, Daniel Fuchs wrote: >> src/java.net.http/share/classes/jdk/internal/net/http/Http1Request.java line >> 302: >> >>> 300: >>> 301: // GET with no body should not set the Content-Length header >>> 302: if (requestPublisher != null || >>> !"GET".e

Re: RFR: 8283544: HttpClient GET method adds Content-Length: 0 header [v3]

2022-03-30 Thread Conor Cleary
> **Issue** > When using the `HttpClient.send()` to send a GET request created using the > `HttpRequest.newBuilder()`, a `Content-length: 0` header is set. This > behaviour causes issues with many services as a body related header is > usually not expected to be included with a GET request. >