RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v3]

Mark Sheppard msheppar at openjdk.org
Wed May 1 22:48:54 UTC 2024


On Wed, 1 May 2024 20:42:22 GMT, robert engels <duke at openjdk.org> wrote:

> But on the point above is not correct. If you follow the code path, you will see that setting a length of 0 - which is what that method defers to - will cause a chunked response to be sent - when it is written to the OutputStream. I am not even sure if you set the transfer-encoding manually that it would work - you still need a "send response headers with a length of 0".

right,  I should have read the javadoc more closely for the method
 public abstract void sendResponseHeaders(int rCode, long responseLength) throws IOException;

the Transfer-Encoding is to be set there

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

PR Comment: https://git.openjdk.org/jdk/pull/18955#issuecomment-2089251273


More information about the net-dev mailing list