aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Green <andy@warmcat.com>2021-11-17 14:48:59 +0000
committerAndy Green <andy@warmcat.com>2021-11-18 08:06:32 +0000
commitbc83a5720782b310ab683e123d27a1558823c345 (patch)
tree3049dfefc4264cfa7dae37871a3c9e9201c95358
parent121dd5e8eefdd3eeae2966e2cedc2d64319d2b79 (diff)
downloadlibwebsockets-bc83a5720782b310ab683e123d27a1558823c345.tar.gz
h2: post: do not try to bind origin for files
-rw-r--r--lib/roles/h2/ops-h2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/roles/h2/ops-h2.c b/lib/roles/h2/ops-h2.c
index a7910811..989cb5b9 100644
--- a/lib/roles/h2/ops-h2.c
+++ b/lib/roles/h2/ops-h2.c
@@ -837,6 +837,9 @@ lws_h2_bind_for_post_before_action(struct lws *wsi)
if (hit->protocol)
name = hit->protocol;
+ else
+ if (hit->origin_protocol == LWSMPRO_FILE)
+ return 0;
pp = lws_vhost_name_to_protocol(wsi->a.vhost, name);
if (!pp) {