Re: HTTP/2 Upgrade with content?

On 13 March 2015 at 07:40, Daniel Stenberg <daniel@haxx.se> wrote:

> Not accepting a POST immediately will be surprising to users. There are
> quite a few users in the wild today that run curl like this:
>
>  $ curl -d lotsofdata [URL]
>
> which thus sends a POST immediately with that data over HTTP/1.1, and the
> same thing for HTTP/2 is almost identical, just adding asking for http2:
>
>  $ curl --http2 -d lotsofdata [URL]
>
> which will make a POST with an Upgrade: h2c header and Expect: 100-continue.
>
> If a server then suddenly doesn't handle the POST + upgrade it puts a rather
> arbitrary (from the client's perspective) block on when a client can or
> cannot switch to HTTP/2 on such a server.

Agreed from hyper's perspective as well.

We can always add logic to only send HTTP upgrade headers on requests
without bodies, but it feels like a weird restriction.

Received on Friday, 13 March 2015 08:53:40 UTC