mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
ws upgrade hs: require Host hdr
This commit is contained in:
parent
db827733c3
commit
3696480b57
1 changed files with 10 additions and 1 deletions
|
@ -309,12 +309,21 @@ lws_process_ws_upgrade(struct lws *wsi)
|
|||
|
||||
default:
|
||||
bad_conn_format:
|
||||
lwsl_err("%s: malformed or absent connection hdr\n", __func__);
|
||||
lwsl_err("%s: malformed or absent connection hdr\n",
|
||||
__func__);
|
||||
|
||||
return 1;
|
||||
}
|
||||
} while (e > 0);
|
||||
|
||||
/* let's also confirm that Host at least exists for h1 */
|
||||
|
||||
if (!lws_hdr_total_length(wsi, WSI_TOKEN_HOST)) {
|
||||
lwsl_err("%s: missing host: hdr on h1 ws upgrade\n", __func__);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined(LWS_WITH_HTTP2)
|
||||
check_protocol:
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue