Skip to content

Commit

Permalink
vhost: server: Ignore a vhost port mismatch when using CONTEXT_PORT_N…
Browse files Browse the repository at this point in the history
…O_LISTEN_SERVER

#3044
  • Loading branch information
markmaker authored and lws-team committed Jan 8, 2024
1 parent f88792d commit 43df490
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/roles/http/server/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -2153,7 +2153,8 @@ lws_confirm_host_header(struct lws *wsi)
if (e != LWS_TOKZE_ENDED)
goto bad_format;

if (wsi->a.vhost->listen_port != port) {
if (wsi->a.vhost->listen_port != port &&
wsi->a.vhost->listen_port != CONTEXT_PORT_NO_LISTEN_SERVER) {
lwsl_info("%s: host port %d mismatches vhost port %d\n",
__func__, port, wsi->a.vhost->listen_port);
return 1;
Expand Down

0 comments on commit 43df490

Please sign in to comment.