diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2009-04-02 06:44:45 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2009-04-02 06:44:45 +0000 |
| commit | a2b7cebbeaf9f85c93af56f11e593bd656a72cc2 (patch) | |
| tree | 25924f734da91d0bde846957f0a0e5b8ca297554 /src/http/ngx_http_parse.c | |
| parent | d10e29e06d61d70ca119a3d8c40f3d2f2f7420db (diff) | |
| download | nginx-a2b7cebbeaf9f85c93af56f11e593bd656a72cc2.tar.gz nginx-a2b7cebbeaf9f85c93af56f11e593bd656a72cc2.tar.bz2 | |
r2202, r2408, r2425, r2454, r2459, r2482, r2504, r2542, r2565, r2579,
r2580, r2585, r2586, r2587, r2591, r2626 merge:
try_files
Diffstat (limited to 'src/http/ngx_http_parse.c')
| -rw-r--r-- | src/http/ngx_http_parse.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c index 9777ebb98..7975361c4 100644 --- a/src/http/ngx_http_parse.c +++ b/src/http/ngx_http_parse.c @@ -1467,3 +1467,39 @@ ngx_http_parse_multi_header_lines(ngx_array_t *headers, ngx_str_t *name, return NGX_DECLINED; } + + +void +ngx_http_split_args(ngx_http_request_t *r, ngx_str_t *uri, ngx_str_t *args) +{ + u_char ch, *p, *last; + + p = uri->data; + + last = p + uri->len; + + args->len = 0; + + while (p < last) { + + ch = *p++; + + if (ch == '?') { + args->len = last - p; + args->data = p; + + uri->len = p - 1 - uri->data; + + if (ngx_strlchr(p, last, '\0') != NULL) { + r->zero_in_uri = 1; + } + + return; + } + + if (ch == '\0') { + r->zero_in_uri = 1; + continue; + } + } +} |
