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

2022-04-19 Thread Daniel Fuchs
On Fri, 8 Apr 2022 10:19:08 GMT, Jaikiran Pai wrote: >> Hello Conor, >> >> I had a look at this latest update to the `Http1Request`. The github diff >> isn't easy to understand/explain in this case, so I'll paste here the latest >> code contained in this PR, from that method. It looks like:

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

2022-04-19 Thread Daniel Fuchs
On Tue, 19 Apr 2022 16:44:35 GMT, Daniel Fuchs wrote: >> test/jdk/java/net/httpclient/ContentLengthHeaderTest.java line 202: >> >>> 200: } else { >>> 201: String responseBody = exchange.getRequestMethod() + " >>> request contained an unexpected " + >>> 202:

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

2022-04-19 Thread Daniel Fuchs
On Thu, 7 Apr 2022 13:53:35 GMT, Conor Cleary wrote: >> **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 >>

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

2022-04-19 Thread Daniel Fuchs
On Tue, 19 Apr 2022 16:43:12 GMT, Daniel Fuchs wrote: >> Conor Cleary has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8283544: Updated URI creation > > test/jdk/java/net/httpclient/ContentLengthHeaderTest.java line 202: > >> 200:

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

2022-04-08 Thread Jaikiran Pai
On Fri, 8 Apr 2022 09:35:31 GMT, Jaikiran Pai wrote: > This is unlike other methods, for example DELETE() where the body publisher > itself is null. In the case of HEAD the body publisher is present but it > still represents that there's no body to that request. Please disregard this part of

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

2022-04-08 Thread Jaikiran Pai
On Thu, 7 Apr 2022 13:53:35 GMT, Conor Cleary wrote: >> **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 >>

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

2022-04-08 Thread Conor Cleary
On Thu, 7 Apr 2022 13:53:35 GMT, Conor Cleary wrote: >> **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 >>

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

2022-04-07 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. >