On Fri, 4 Mar 2022 11:21:47 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:
>> 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. > > I understand why you do it - but the client will react differently if both > Content-Length *and* chunk are specified, as opposed to when only > Content-Length is specified. So I just want to make sure that we are testing > the same thing than before. If we are not testing the same thing, then you > might have to use a ServerSocket directly - rather than an HttpServer, to > make sure we're sending back the same things than before. Now not using Transfer-Encoding Chunk. ------------- PR: https://git.openjdk.java.net/jdk/pull/7616