mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
http proxy: fix host
This commit is contained in:
parent
8ab44ae28b
commit
af64c7fc4f
1 changed files with 3 additions and 0 deletions
|
@ -1371,6 +1371,7 @@ lws_http_proxy_start(struct lws *wsi, const struct lws_http_mount *hit,
|
||||||
* directly, otherwise we must convert h2 :authority to h1
|
* directly, otherwise we must convert h2 :authority to h1
|
||||||
* host */
|
* host */
|
||||||
|
|
||||||
|
#if 0
|
||||||
i.host = NULL;
|
i.host = NULL;
|
||||||
#if defined(LWS_ROLE_H2)
|
#if defined(LWS_ROLE_H2)
|
||||||
n = lws_hdr_total_length(wsi, WSI_TOKEN_HTTP_COLON_AUTHORITY);
|
n = lws_hdr_total_length(wsi, WSI_TOKEN_HTTP_COLON_AUTHORITY);
|
||||||
|
@ -1383,6 +1384,8 @@ lws_http_proxy_start(struct lws *wsi, const struct lws_http_mount *hit,
|
||||||
if (n > 0)
|
if (n > 0)
|
||||||
i.host = lws_hdr_simple_ptr(wsi, WSI_TOKEN_HOST);
|
i.host = lws_hdr_simple_ptr(wsi, WSI_TOKEN_HOST);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
i.host = i.address;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (i.address[0] != '+' ||
|
if (i.address[0] != '+' ||
|
||||||
|
|
Loading…
Add table
Reference in a new issue