Re: HTTP/2 Upgrade with content?

On Fri, Mar 13, 2015 at 11:35 PM, Roland Zink <roland@zinks.de> wrote:

> On 13.03.2015 15:21, Stefan Eissing wrote:
>
>> Well, this discussion quickly dove into the quantum foam between
>> specification and deployed software.
>>
>> I take away from it:
>> - that protocol switching happens immediately after the 101 response -
>> for the downstream. On the upstream it switches after the request has been
>> read. Pretty obvious in hindsight, as those things are.
>> - servers should be predictable in upgrading, either always with content
>> or only without.
>> - the common use case for upgrade on POST does not benefit from h2c and
>> this it seems not worth the effort to implement. Fullfilling the request on
>> HTTP/1.1 format seems to work fine.
>> - maybe a mixed 1.1 up and h2c down request could be made to work, but
>> there seems no gain for anyone in creating this mythical beast.
>>
>> //Stefan
>>
>>  Another thing which the client may do if it needs to send a POST request
> first and doesn't know if the server supports HTTP2 is to send an OPTIONS
> request in front of the POST. Either the upgrade already works for the
> OPTIONS request or it is then known the server will only support HTTP/1.1.
>
>
In nghttp2 project, ​nghttp client does this approach: Use OPTIONS with
POST for h2c upgrade.
nghttpx proxy only performs HTTP/2 upgrade if request has no request body,
which I think has some popularity in this thread.  The reason why we chose
this approach is... well we just defer the complicated effort to the
future, but in retrospect, I think it is a good compromise for simplicity.

​Best regards,
Tatsuhiro Tsujikawa​

Received on Friday, 13 March 2015 16:43:56 UTC