From 2a6af1d21407cffbb687fffa8b6a1e7c8a273ddd Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Mon, 9 Sep 2019 17:39:24 +0300 Subject: Added "extern" to nxt_http_fields_hash_proto to avoid link issues. --- 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 c5b11bf3..42189182 100644 --- a/src/nxt_http_parse.h +++ b/src/nxt_http_parse.h @@ -113,7 +113,7 @@ nxt_int_t nxt_http_fields_process(nxt_list_t *fields, nxt_lvlhsh_t *hash, void *ctx); -const nxt_lvlhsh_proto_t nxt_http_fields_hash_proto; +extern const nxt_lvlhsh_proto_t nxt_http_fields_hash_proto; nxt_inline nxt_int_t nxt_http_field_process(nxt_http_field_t *field, nxt_lvlhsh_t *hash, void *ctx) -- cgit From 64be8717bdc2f0f8f11cbb8d18a0f96d2c24c6d3 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Mon, 16 Sep 2019 20:17:42 +0300 Subject: Configuration: added ability to access object members with slashes. Now URI encoding can be used to escape "/" in the request path: GET /config/listeners/unix:%2Fpath%2Fto%2Fsocket/ --- src/nxt_http_parse.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/nxt_http_parse.h') diff --git a/src/nxt_http_parse.h b/src/nxt_http_parse.h index 42189182..e42ec9a4 100644 --- a/src/nxt_http_parse.h +++ b/src/nxt_http_parse.h @@ -68,6 +68,9 @@ struct nxt_http_request_parse_s { unsigned space_in_target:1; /* target with "+" */ unsigned plus_in_target:1; + + /* Preserve encoded '/' (%2F) and '%' (%25). */ + unsigned encoded_slashes:1; }; -- cgit From 2fb7a1bfb90c4c8d484e4b0c4bd5ae2a594fd6e1 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Mon, 16 Sep 2019 20:17:42 +0300 Subject: HTTP parser: removed unused "exten_start" and "args_start" fields. --- src/nxt_http_parse.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/nxt_http_parse.h') diff --git a/src/nxt_http_parse.h b/src/nxt_http_parse.h index e42ec9a4..29e3688e 100644 --- a/src/nxt_http_parse.h +++ b/src/nxt_http_parse.h @@ -43,8 +43,6 @@ struct nxt_http_request_parse_s { u_char *target_start; u_char *target_end; - u_char *exten_start; - u_char *args_start; nxt_str_t path; nxt_str_t args; -- cgit From 56f4085b9d1d00ecdd359e3deb9c06a3b8ba0874 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Mon, 16 Sep 2019 20:17:42 +0300 Subject: HTTP parser: removed unused "offset" field. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks to 洪志道 (Hong Zhi Dao). --- src/nxt_http_parse.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/nxt_http_parse.h') diff --git a/src/nxt_http_parse.h b/src/nxt_http_parse.h index 29e3688e..e66475a1 100644 --- a/src/nxt_http_parse.h +++ b/src/nxt_http_parse.h @@ -37,8 +37,6 @@ struct nxt_http_request_parse_s { nxt_int_t (*handler)(nxt_http_request_parse_t *rp, u_char **pos, u_char *end); - size_t offset; - nxt_str_t method; u_char *target_start; -- cgit From 3b77e402a903d9f7a6eeb32f7930d8979f8e0c9e Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Mon, 16 Sep 2019 20:17:42 +0300 Subject: HTTP parser: removed unused "plus_in_target" flag. --- src/nxt_http_parse.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/nxt_http_parse.h') diff --git a/src/nxt_http_parse.h b/src/nxt_http_parse.h index e66475a1..a307ea73 100644 --- a/src/nxt_http_parse.h +++ b/src/nxt_http_parse.h @@ -57,16 +57,14 @@ struct nxt_http_request_parse_s { uint32_t field_hash; /* target with "/." */ - unsigned complex_target:1; + uint8_t complex_target; /* 1 bit */ /* target with "%" */ - unsigned quoted_target:1; + uint8_t quoted_target; /* 1 bit */ /* target with " " */ - unsigned space_in_target:1; - /* target with "+" */ - unsigned plus_in_target:1; + uint8_t space_in_target; /* 1 bit */ /* Preserve encoded '/' (%2F) and '%' (%25). */ - unsigned encoded_slashes:1; + uint8_t encoded_slashes; /* 1 bit */ }; -- cgit