1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

ws proxy: also proxy ACCEPT_LANGUAGE

This commit is contained in:
Andy Green 2019-03-25 19:03:19 +08:00
parent 1062370f07
commit 49d78fd0de

View file

@ -125,6 +125,16 @@ lws_callback_ws_proxy(struct lws *wsi, enum lws_callback_reasons reason,
lws_set_timeout(wsi->parent, 1, LWS_TO_KILL_ASYNC);
break;
case LWS_CALLBACK_CLIENT_APPEND_HANDSHAKE_HEADER:
{
unsigned char **p = (unsigned char **)in, *end = (*p) + len,
tmp[128];
proxy_header(wsi, wsi->parent, tmp, sizeof(tmp),
WSI_TOKEN_HTTP_ACCEPT_LANGUAGE, p, end);
break;
}
case LWS_CALLBACK_CLIENT_RECEIVE:
pkt = lws_malloc(sizeof(*pkt) + LWS_PRE + len, __func__);
if (!pkt)