RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v4]
Michael McMahon
michaelm at openjdk.org
Fri Jun 14 10:32:28 UTC 2024
On Wed, 1 May 2024 21:12:05 GMT, robert engels <duke at openjdk.org> wrote:
>> improve the HttpExchange api with documented constants and convenience methods to avoid common bugs
>
> robert engels has updated the pull request incrementally with two additional commits since the last revision:
>
> - Merge remote-tracking branch 'robaho/HttpExchange-api-change' into HttpExchange-api-change
>
> # Conflicts:
> # src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpExchange.java
> - update api changes based on comments
I think the more minimal the change, the better for this PR. The discussion generally has widened to something more suited to a small JEP on how to take the API forward at a higher level. I think I'd be happiest at this point with just the two constants defined and some adjustment to the apidoc for sendResponseHeaders() including this:
If {@literal == CHUNKED_CONTENT}, then chunked encoding is used,
and an arbitrary number of bytes may be written.
If {@literal == NO_CONTENT or < -1}, then no response body length is
specified and no response body may be written.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18955#issuecomment-2167734290
More information about the net-dev
mailing list