Re: HTTP/2 Upgrade with content?

On 14 March 2015 at 00:09, Jason T. Greene <jason.greene@redhat.com> wrote:

>
> > On Mar 13, 2015, at 2:44 AM, Daniel Stenberg <daniel@haxx.se> wrote:
> >
> > $ curl --http2 -d lotsofdata [URL]
> >
> > which will make a POST with an Upgrade: h2c header and Expect:
> 100-continue.
>
> Why not attempt a PRI with the explicit http2 option?


Yes that would be a lot better and we already support it in jetty.
The issue with the curl usecase using upgrade is that all the upgrade work
is essentially wasted effort - as the bulk upload is done with HTTP/1.1,
you then upgrade to a fully multiplexed HTTP/2 connection, negotiate a
couple of settings, send a single 2xx response and then get a goaway frame
to tear the whole lot down.    What value did the --http2 provide other
than make work!

Failing the direct PRI approach, it would be far better to try the upgrade
on an OPTION request before commencing on the big post/put.

So currently implemented in jetty as an ignore of any h2c upgrade in a
request with a body.

cheers


-- 
Greg Wilkins <gregw@intalio.com>  @  Webtide - *an Intalio subsidiary*
http://eclipse.org/jetty HTTP, SPDY, Websocket server and client that scales
http://www.webtide.com  advice and support for jetty and cometd.

Received on Friday, 13 March 2015 13:19:53 UTC