1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-23 00:00:06 +01:00
libwebsockets/lib
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
..
abstract smtp: make abstract 2019-05-04 08:28:31 +01:00
core generic-sessions update 2019-05-06 10:24:51 +01:00
core-net generic-sessions update 2019-05-06 10:24:51 +01:00
event-libs uv: solve contradiction with WITHOUT_SERVER 2019-05-09 07:28:36 +01:00
jose lws_struct 2019-04-06 06:08:47 +08:00
misc generic-sessions update 2019-05-06 10:24:51 +01:00
plat pmd: split ebufs to track in and out 2019-05-06 07:31:32 +01:00
roles h2: align h1 upgrade to work same as alpn upgrade 2019-05-12 08:01:50 +01:00
tls mbedtls: correct memory cert usage 2019-05-11 08:07:27 +01:00
README.md JOSE: refactor and prepare for JWE 2018-12-27 06:45:31 +08:00

Library sources layout

Code that goes in the libwebsockets library itself lives down ./lib

Path Sources
lib/core Core lws code related to generic fd and wsi servicing and management
lib/event-libs Code containing optional event-lib specific adaptations
lib/jose JOSE / JWS / JWK / JWE implementations
lib/misc Code for various mostly optional miscellaneous features
lib/plat Platform-specific adaptation code
lib/roles Code for specific optional wsi roles, eg, http/1, h2, ws, raw, etc
lib/tls Code supporting the various TLS libraries
libwebsockets.h Public API header for the whole of lws