diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-07-05 13:31:45 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-07-05 13:31:45 +0300 |
commit | f3107f3896c199a5bc166f57ccd9fef2823ccdaf (patch) | |
tree | 1bb2388940d3ad1be08ababfecd270c65289cf26 /src/nxt_http_parse.h | |
parent | f05d674126f3ec3f147f645231a1357e4a0784bf (diff) | |
download | unit-f3107f3896c199a5bc166f57ccd9fef2823ccdaf.tar.gz unit-f3107f3896c199a5bc166f57ccd9fef2823ccdaf.tar.bz2 |
Complex target parser copied from NGINX.
nxt_app_request_header_t fields renamed:
- 'path' renamed to 'target'.
- 'path_no_query' renamed to 'path' and contains parsed value.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_http_parse.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nxt_http_parse.h b/src/nxt_http_parse.h index da8c4ce6..2baa36ce 100644 --- a/src/nxt_http_parse.h +++ b/src/nxt_http_parse.h @@ -32,6 +32,10 @@ struct nxt_http_request_parse_s { u_char *exten_start; u_char *args_start; + nxt_str_t path; + nxt_str_t args; + nxt_str_t exten; + nxt_http_ver_t version; union { @@ -45,6 +49,7 @@ struct nxt_http_request_parse_s { nxt_http_fields_hash_t *fields_hash; nxt_list_t *fields; + nxt_mp_t *mem_pool; /* target with "/." */ unsigned complex_target:1; @@ -80,6 +85,8 @@ struct nxt_http_field_s { nxt_inline nxt_int_t nxt_http_parse_request_init(nxt_http_request_parse_t *rp, nxt_mp_t *mp) { + rp->mem_pool = mp; + rp->fields = nxt_list_create(mp, 8, sizeof(nxt_http_field_t)); if (nxt_slow_path(rp->fields == NULL)){ return NXT_ERROR; |