1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-23 00:00:06 +01:00
libwebsockets/lib/roles/h2
Andy Green 173943a405 h2: align h1 upgrade to work same as alpn upgrade
https://github.com/warmcat/libwebsockets/issues/1571

Although the code exists for non-tls h1 upgrade to h2, it hasn't been looked
after since all expected uses for h2 are going to be via h2 / alpn.

This patch aligns its upgrade actions with alpn upgrade path so it works OK
via

$ curl --http2 http://localhost:7681/ -v -w "\n"

ie, without tls.  Operation via tls is unaffected.

To use the non-tls upgrade path, you have to be listening without tls, ie with the
test server without -s.  If you're listening in a way that requires tls, this
can't be used to bypass that (or, eg, client certs) in itself, since you have to be
able to talk to it in h1 in the first place to attempt the upgrade to h2.

The common h2 path has some code to dropping the ah unconditionally it looks
like after the first service... this is too aggressive since the first thing
coming on the upgrade path is WINDOW_UPDATE.  It looks wrong anyway, transaction /
stream completion will drop the ah and should be enough.
2019-05-12 08:01:50 +01:00
..
hpack.c ah: custom headers for h1 2019-03-10 08:02:02 +08:00
http2.c rx flow: use dll2 2019-04-21 19:35:18 +01:00
huftable.h refactor role ops 2018-04-11 13:39:42 +08:00
minihuf.c libwebsockets.h: clean out some boilerplate better put in core/private.h 2018-08-16 19:10:32 +08:00
ops-h2.c h2: align h1 upgrade to work same as alpn upgrade 2019-05-12 08:01:50 +01:00
private.h clean: general whitespace cleanup 2018-11-23 08:47:56 +08:00