Mercurial > hg > nginx-vendor-0-7
comparison src/http/ngx_http_request.c @ 216:fa32d59d9a15 NGINX_0_3_55
nginx 0.3.55
*) Feature: the "stub" parameter in the "include" SSI command.
*) Feature: the "block" SSI command.
*) Feature: the unicode2nginx script was added to contrib.
*) Bugfix: if a "root" was specified by variable only, then the root
was relative to a server prefix.
*) Bugfix: if the request contained "//" or "/./" and escaped symbols
after them, then the proxied request was sent unescaped.
*) Bugfix: the $r->headers_in("Cookie") of the ngx_http_perl_module now
returns all "Cookie" header lines.
*) Bugfix: a segmentation fault occurred if
"client_body_in_file_only on" was used and nginx switched to a next
upstream.
*) Bugfix: on some condition while reconfiguration character codes
inside the "charset_map" may be treated invalid; bug appeared in
0.3.50.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Fri, 28 Jul 2006 00:00:00 +0400 |
parents | 0ad9eeb6ac7f |
children | 1bf60f8c5c9e |
comparison
equal
deleted
inserted
replaced
215:84a7f4bc1133 | 216:fa32d59d9a15 |
---|---|
851 if (h->key.len == r->lowcase_index) { | 851 if (h->key.len == r->lowcase_index) { |
852 ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len); | 852 ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len); |
853 | 853 |
854 } else { | 854 } else { |
855 for (i = 0; i < h->key.len; i++) { | 855 for (i = 0; i < h->key.len; i++) { |
856 h->lowcase_key[i] = ngx_tolower(h->lowcase_key[i]); | 856 h->lowcase_key[i] = ngx_tolower(h->key.data[i]); |
857 } | 857 } |
858 } | 858 } |
859 | 859 |
860 hh = ngx_hash_find(&cmcf->headers_in_hash, h->hash, | 860 hh = ngx_hash_find(&cmcf->headers_in_hash, h->hash, |
861 h->lowcase_key, h->key.len); | 861 h->lowcase_key, h->key.len); |
1456 } | 1456 } |
1457 | 1457 |
1458 ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | 1458 ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
1459 "http finalize request: %d, \"%V?%V\"", | 1459 "http finalize request: %d, \"%V?%V\"", |
1460 rc, &r->uri, &r->args); | 1460 rc, &r->uri, &r->args); |
1461 | |
1462 if (r != r->main | |
1463 && rc != NGX_ERROR | |
1464 && !r->connection->error | |
1465 && !r->request_output | |
1466 && r->out) | |
1467 { | |
1468 if (!r->header_sent) { | |
1469 rc = ngx_http_set_content_type(r); | |
1470 | |
1471 if (rc == NGX_OK) { | |
1472 rc = ngx_http_send_header(r); | |
1473 | |
1474 if (rc != NGX_ERROR) { | |
1475 rc = ngx_http_output_filter(r, r->out); | |
1476 } | |
1477 } | |
1478 | |
1479 } else { | |
1480 rc = ngx_http_output_filter(r, r->out); | |
1481 } | |
1482 } | |
1461 | 1483 |
1462 if (rc == NGX_ERROR | 1484 if (rc == NGX_ERROR |
1463 || rc == NGX_HTTP_REQUEST_TIME_OUT | 1485 || rc == NGX_HTTP_REQUEST_TIME_OUT |
1464 || r->connection->error) | 1486 || r->connection->error) |
1465 { | 1487 { |
2433 &u->uri); | 2455 &u->uri); |
2434 len -= p - buf; | 2456 len -= p - buf; |
2435 buf = p; | 2457 buf = p; |
2436 } | 2458 } |
2437 | 2459 |
2438 return ngx_http_log_error_info(r, buf, len); | |
2439 } | |
2440 | |
2441 | |
2442 u_char * | |
2443 ngx_http_log_error_info(ngx_http_request_t *r, u_char *buf, size_t len) | |
2444 { | |
2445 u_char *p; | |
2446 | |
2447 if (r->headers_in.host) { | 2460 if (r->headers_in.host) { |
2448 p = ngx_snprintf(buf, len, ", host: \"%V\"", | 2461 p = ngx_snprintf(buf, len, ", host: \"%V\"", |
2449 &r->headers_in.host->value); | 2462 &r->headers_in.host->value); |
2450 len -= p - buf; | 2463 len -= p - buf; |
2451 buf = p; | 2464 buf = p; |