From 64934e59f9c06f62fe99466b320cd397c8609807 Mon Sep 17 00:00:00 2001 From: Zhidao HONG Date: Wed, 10 Apr 2024 13:45:34 +0800 Subject: HTTP: Introduce quoted target marker in HTTP parsing The quoted_target field is to indentify URLs containing percent-encoded characters. It can be used in places where you might need to generate new URL, such as in the proxy module. It will be used in the subsequent commit. --- src/nxt_http_parse.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nxt_http_parse.h') diff --git a/src/nxt_http_parse.h b/src/nxt_http_parse.h index fa95e842..9e1265d1 100644 --- a/src/nxt_http_parse.h +++ b/src/nxt_http_parse.h @@ -61,9 +61,9 @@ struct nxt_http_request_parse_s { /* target with "/." */ uint8_t complex_target; /* 1 bit */ -#if 0 /* target with "%" */ uint8_t quoted_target; /* 1 bit */ +#if 0 /* target with " " */ uint8_t space_in_target; /* 1 bit */ #endif -- cgit From 999d274837273e354efc05075c0b012b81902ef1 Mon Sep 17 00:00:00 2001 From: Zhidao HONG Date: Tue, 11 Jun 2024 10:18:44 +0800 Subject: http: Move chunked buffer pos pointer while parsing Previously, Unit didn't move the buffer pointer when parsing chunked data because the buffer was not used after sent. It's used for upstream response. With the new requirement to support request chunked body, the buffer might be used for pipeline request, so it's necessary to move the pos pointer while parsing. Reviewed-by: Andrew Clayton --- src/nxt_http_parse.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/nxt_http_parse.h') diff --git a/src/nxt_http_parse.h b/src/nxt_http_parse.h index 9e1265d1..9e2f6fab 100644 --- a/src/nxt_http_parse.h +++ b/src/nxt_http_parse.h @@ -96,11 +96,8 @@ struct nxt_http_field_s { typedef struct { - u_char *pos; nxt_mp_t *mem_pool; - uint64_t chunk_size; - uint8_t state; uint8_t last; /* 1 bit */ uint8_t chunk_error; /* 1 bit */ -- cgit