On Mon, 13 Oct 2025 16:02:28 GMT, Daniel Fuchs <[email protected]> wrote:

>> Josiah Noel has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Update UpgradeInputStream.java
>
> src/jdk.httpserver/share/classes/sun/net/httpserver/ExchangeImpl.java line 
> 172:
> 
>> 170:         if (upgrade) {
>> 171:             uis_orig = new UpgradeInputStream(this, ris);
>> 172:         } else if (reqContentLen == -1L) {
> 
> Are we sure that `upgrade` and `reqConteLength != 0` are always exclusive? 
> IIRC this is not the case for the HTTP/2 upgrade. The request body (if 
> present) is sent through HTTP/1.1 and only after that is the connection 
> upgraded to HTTP/2 - if the upgrade is accepted. Also the handler could very 
> well ignore the upgrade and continue with HTTP/1.1.
> 
> It seems we need more discussion on whether we should support connection 
> upgrade and what kind of API would be needed for that.

GET requests usually don't have bodies

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27751#discussion_r2426811348

Reply via email to