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

Jaikiran Pai jpai at openjdk.java.net
Fri Apr 8 10:22:40 UTC 2022


On Fri, 8 Apr 2022 09:35:31 GMT, Jaikiran Pai <jpai at openjdk.org> 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 the comment. As you and Daniel rightly noted in a private conversation, the `HttpRequestBuilderImpl` overrides the `HEAD()` method to set `null` to the body publisher.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8017


More information about the net-dev mailing list