summaryrefslogtreecommitdiff
path: root/src/http-header-glue.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2022-03-24 04:21:11 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2022-03-25 08:43:42 -0400
commit5d1aa5d06f1dcae64481c142f7daaa0b08aee8d3 (patch)
tree3db59449f9dc69847f3cf29506d31e0135d00055 /src/http-header-glue.c
parent8fe9f1c053d828f666c0498d8b4281efabe6d3a6 (diff)
downloadlighttpd-git-5d1aa5d06f1dcae64481c142f7daaa0b08aee8d3.tar.gz
[multiple] WebSockets over HTTP/2 (fixes #3151)
Add support for WebSockets over HTTP/2 to lighttpd core and to mod_cgi w/ config: cgi.upgrade = "enable" mod_proxy w/ config: proxy.header += ("upgrade" => "enable") mod_wstunnel HTTP/2 CONNECT extension defined in RFC8441 is translated to HTTP/1.1 'Upgrade: websocket' requests to mod_cgi or mod_proxy, and is handled directly in mod_wstunnel. x-ref: WebSockets over HTTP/2 https://redmine.lighttpd.net/issues/3151 Bootstrapping WebSockets with HTTP/2 https://datatracker.ietf.org/doc/html/rfc8441
Diffstat (limited to 'src/http-header-glue.c')
-rw-r--r--src/http-header-glue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/http-header-glue.c b/src/http-header-glue.c
index e8e93d1b..339f9277 100644
--- a/src/http-header-glue.c
+++ b/src/http-header-glue.c
@@ -951,7 +951,8 @@ static int http_response_process_headers(request_st * const restrict r, http_res
/*(flag only for mod_proxy and mod_cgi (for now))*/
if (opts->backend != BACKEND_PROXY && opts->backend != BACKEND_CGI)
continue;
- if (r->http_version >= HTTP_VERSION_2) continue;
+ if (r->http_version >= HTTP_VERSION_2 && !r->h2_connect_ext)
+ continue;
break;
case HTTP_HEADER_CONNECTION:
if (opts->backend == BACKEND_PROXY) continue;