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:
parent
b399237fe8
commit
26da6425cf
4 changed files with 714 additions and 709 deletions
|
@ -1,6 +1,7 @@
|
|||
/* set of parsable strings -- ALL LOWER CASE */
|
||||
|
||||
static const char *set[] = {
|
||||
"proxy ",
|
||||
"get ",
|
||||
"post ",
|
||||
"options ",
|
||||
|
|
1419
lib/lextable.h
1419
lib/lextable.h
File diff suppressed because it is too large
Load diff
|
@ -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,
|
||||
|
|
|
@ -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 =
|
||||
|
|
Loading…
Add table
Reference in a new issue