RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v3]
robert engels
duke at openjdk.org
Wed May 1 12:43:52 UTC 2024
On Wed, 1 May 2024 11:21:59 GMT, Mark Sheppard <msheppar at openjdk.org> wrote:
> sendResponseHeaderChunked The description implies that this method is sending a chunked response, but the method is not doing that. ...
I don't think it is implying that. The methods:
OutputStream sendResponseHeadersChunked(int code);
OutputStream sendResponseHeadersFixed(int code,long length);
only inform the server of the response intent. The code must write to and close the provided OutputStream.
The methods
void sendResponseNoContent(int code);
void sendResponse(int code,byte[] data);
both close the exchange. No further writes are permitted.
The "response headers" are not the "response or response content".
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18955#issuecomment-2088410098
More information about the net-dev
mailing list