On Wed, 2 Mar 2022 12:42:11 GMT, Daniel Fuchs <[email protected]> wrote:
>> Mahendra Chhipa has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Removed extra whitespace
>
> test/jdk/sun/net/www/http/KeepAliveCache/B5045306.java line 206:
>
>> 204: // override the Content-length header to be greater
>> than the actual response body
>> 205: trans.getResponseHeaders().set("Content-length",
>> Integer.toString(responseBody.length+1));
>> 206: trans.sendResponseHeaders(200, 0);
>
> Here again we will be mixing Content-Length and chunked
In case of HttpExchange.setResponseHeader(). If responseLength is -1, then
content-length value is overridden to 0, if already set explicitly. Same is the
case when responseLength is > 0. Only in the case when responseLength == 0,
content-length value is not overriden if already set explicitly., that's why I
am using chunked encoding and writing the data less than the content length.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7616