comparison src/http/ngx_http_parse.c @ 464:c8cfb6c462ef NGINX_0_7_44

nginx 0.7.44 *) Feature: the ngx_http_proxy_module preliminary cache support. *) Feature: the --with-pcre option in the configure. *) Feature: the "try_files" directive is now allowed on the server block level. *) Bugfix: the "try_files" directive handled incorrectly a query string in a fallback parameter. *) Bugfix: the "try_files" directive might test incorrectly directories. *) Bugfix: if there is the single server for given address:port pair, then captures in regular expressions in a "server_name" directive did not work.
author Igor Sysoev <http://sysoev.ru>
date Mon, 23 Mar 2009 00:00:00 +0300
parents fd759445d8a8
children 6866b490272e
comparison
equal deleted inserted replaced
463:51cb914e6d3a 464:c8cfb6c462ef
1521 } 1521 }
1522 } 1522 }
1523 1523
1524 return NGX_DECLINED; 1524 return NGX_DECLINED;
1525 } 1525 }
1526
1527
1528 void
1529 ngx_http_split_args(ngx_http_request_t *r, ngx_str_t *uri, ngx_str_t *args)
1530 {
1531 u_char ch, *p, *last;
1532
1533 p = uri->data;
1534
1535 last = p + uri->len;
1536
1537 while (p < last) {
1538
1539 ch = *p++;
1540
1541 if (ch == '?') {
1542 args->len = last - p;
1543 args->data = p;
1544
1545 uri->len = p - 1 - uri->data;
1546
1547 if (ngx_strlchr(p, last, '\0') != NULL) {
1548 r->zero_in_uri = 1;
1549 }
1550
1551 return;
1552 }
1553
1554 if (ch == '\0') {
1555 r->zero_in_uri = 1;
1556 continue;
1557 }
1558 }
1559 }