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

proxy protocol (version 1) parsing implementation

The proxy line is dumped in the token buffer as any other HTTP header
This commit is contained in:
José Luis Millán 2014-12-13 11:28:45 +01:00
parent b399237fe8
commit 26da6425cf
4 changed files with 714 additions and 709 deletions

View file

@ -1,6 +1,7 @@
/* set of parsable strings -- ALL LOWER CASE */
static const char *set[] = {
"proxy ",
"get ",
"post ",
"options ",

File diff suppressed because it is too large Load diff

View file

@ -309,6 +309,7 @@ struct lws_tokens {
*/
enum lws_token_indexes {
WSI_TOKEN_PROXY,
WSI_TOKEN_GET_URI,
WSI_TOKEN_POST_URI,
WSI_TOKEN_OPTIONS_URI,

View file

@ -449,7 +449,7 @@ swallow:
n = WSI_TOKEN_ORIGIN;
wsi->u.hdr.parser_state = (enum lws_token_indexes)
(WSI_TOKEN_GET_URI + n);
(WSI_TOKEN_PROXY + n);
if (context->token_limits)
wsi->u.hdr.current_token_limit =