RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v4]
robert engels
duke at openjdk.org
Thu May 2 00:19:54 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 did not write any tests cases, or even highly review the implementations. They were just examples, with regards to
> The first issue is that if data.length is 0 that starts a chunked transfer where what they'd really want to do is send the NO_CONTENT value of -1.
Yea, the fix is trivial. I don't think it is a hole that requires the Body interface.
I don't think the 'assertion can be invalidated by mistake' - that would be an impl bug - I don't think the code would have this as an issue either.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18955#issuecomment-2089325866
More information about the net-dev
mailing list