Mercurial > hg > nginx-vendor-0-8
comparison src/http/ngx_http_parse.c @ 432:fd759445d8a8 NGINX_0_7_28
nginx 0.7.28
*) Change: in memory allocation in the ngx_http_gzip_filter_module.
*) Change: the default "gzip_buffers" directive values have been
changed to 32 4k or 16 8k from 4 4k/8k.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 22 Dec 2008 00:00:00 +0300 |
parents | b246022ef454 |
children | c8cfb6c462ef |
comparison
equal
deleted
inserted
replaced
431:e2c4e8b635a8 | 432:fd759445d8a8 |
---|---|
1479 } | 1479 } |
1480 } | 1480 } |
1481 | 1481 |
1482 return NGX_DECLINED; | 1482 return NGX_DECLINED; |
1483 } | 1483 } |
1484 | |
1485 | |
1486 ngx_int_t | |
1487 ngx_http_arg(ngx_http_request_t *r, u_char *name, size_t len, ngx_str_t *value) | |
1488 { | |
1489 u_char *p; | |
1490 | |
1491 if (r->args.len == 0) { | |
1492 return NGX_DECLINED; | |
1493 } | |
1494 | |
1495 for (p = r->args.data; *p && *p != ' '; p++) { | |
1496 | |
1497 /* | |
1498 * although r->args.data is not null-terminated by itself, | |
1499 * however, there is null in the end of request line | |
1500 */ | |
1501 | |
1502 p = ngx_strcasestrn(p, (char *) name, len - 1); | |
1503 | |
1504 if (p == NULL) { | |
1505 return NGX_DECLINED; | |
1506 } | |
1507 | |
1508 if ((p == r->args.data || *(p - 1) == '&') && *(p + len) == '=') { | |
1509 | |
1510 value->data = p + len + 1; | |
1511 | |
1512 p = (u_char *) ngx_strchr(p, '&'); | |
1513 | |
1514 if (p == NULL) { | |
1515 p = r->args.data + r->args.len; | |
1516 } | |
1517 | |
1518 value->len = p - value->data; | |
1519 | |
1520 return NGX_OK; | |
1521 } | |
1522 } | |
1523 | |
1524 return NGX_DECLINED; | |
1525 } |