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

2022-05-17 Thread Conor Cleary
On Thu, 12 May 2022 12:23:34 GMT, Jaikiran Pai wrote: >> Will await further review for a short while and then integrate if approved. > >> Will await further review for a short while and then integrate if approved. > > Hello Conor, looking at the latest state of the PR, I think you might have >

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

2022-05-16 Thread Jaikiran Pai
On Mon, 16 May 2022 08:59:43 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 [v8]

2022-05-16 Thread Daniel Fuchs
On Mon, 16 May 2022 08:59:43 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 [v8]

2022-05-16 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. >

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

2022-05-16 Thread Conor Cleary
On Thu, 12 May 2022 12:23:34 GMT, Jaikiran Pai wrote: >> Will await further review for a short while and then integrate if approved. > >> Will await further review for a short while and then integrate if approved. > > Hello Conor, looking at the latest state of the PR, I think you might have >

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

2022-05-12 Thread Daniel Fuchs
On Fri, 6 May 2022 13:46:41 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 [v7]

2022-05-12 Thread Jaikiran Pai
On Thu, 12 May 2022 12:01:23 GMT, Conor Cleary wrote: > Will await further review for a short while and then integrate if approved. Hello Conor, looking at the latest state of the PR, I think you might have missed Daniel's review comment https://github.com/openjdk/jdk/pull/8017#discussion_r866

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

2022-05-12 Thread Conor Cleary
On Fri, 6 May 2022 13:46:41 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 [v6]

2022-05-06 Thread Daniel Fuchs
On Fri, 6 May 2022 10:39:38 GMT, Daniel Fuchs wrote: >> Conor Cleary has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8283544: Improved logging, drain input stream > > src/java.net.http/share/classes/jdk/internal/net/http/Http1Request.jav

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

2022-05-06 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. >

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

2022-05-06 Thread Daniel Fuchs
On Fri, 6 May 2022 10:33:31 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 [v6]

2022-05-06 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. >

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 t

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. >

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. >

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

2022-03-30 Thread Conor Cleary
On Wed, 30 Mar 2022 08:29:40 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 [v2]

2022-03-30 Thread Conor Cleary
On Tue, 29 Mar 2022 17:09:37 GMT, Daniel Fuchs wrote: > I would not expect that throwing an AssertionError in the handler on the > server side would make the client (and the test) fail (except maybe in > timeout?). I'd suggest printing a message on System.err and sending a > different error co

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

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. >

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

2022-03-30 Thread Conor Cleary
On Tue, 29 Mar 2022 18:23:02 GMT, Daniel Jeliński 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

2022-03-29 Thread Daniel Fuchs
On Tue, 29 Mar 2022 18:31:02 GMT, Daniel Jeliński 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

2022-03-29 Thread Daniel Jeliński
On Tue, 29 Mar 2022 15:44:58 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 > usua

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

2022-03-29 Thread Daniel Fuchs
On Tue, 29 Mar 2022 15:44:58 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 > usua

RFR: 8283544: HttpClient GET method adds Content-Length: 0 header

2022-03-29 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. **Solution**