Mercurial > hg > nginx-vendor-current
diff src/http/modules/ngx_http_fastcgi_module.c @ 392:34fb3a573548 NGINX_0_7_8
nginx 0.7.8
*) Feature: the ngx_http_xslt_module.
*) Feature: the "$arg_..." variables.
*) Feature: Solaris directio support.
Thanks to Ivan Debnar.
*) Bugfix: now if FastCGI server sends a "Location" header line without
status line, then nginx uses 302 status code.
Thanks to Maxim Dounin.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 04 Aug 2008 00:00:00 +0400 |
parents | 984bb0b1399b |
children | a094317ba307 |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_fastcgi_module.c +++ b/src/http/modules/ngx_http_fastcgi_module.c @@ -1120,9 +1120,7 @@ ngx_http_fastcgi_process_header(ngx_http ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len); } else { - for (i = 0; i < h->key.len; i++) { - h->lowcase_key[i] = ngx_tolower(h->key.data[i]); - } + ngx_strlow(h->lowcase_key, h->key.data, h->key.len); } hh = ngx_hash_find(&umcf->headers_in_hash, h->hash, @@ -1167,6 +1165,13 @@ ngx_http_fastcgi_process_header(ngx_http u->headers_in.status_n = status; u->headers_in.status_line = *status_line; + } else if (u->headers_in.location) { + u->headers_in.status_n = 302; + u->headers_in.status_line.len = + sizeof("302 Moved Temporarily") - 1; + u->headers_in.status_line.data = + (u_char *) "302 Moved Temporarily"; + } else { u->headers_in.status_n = 200; u->headers_in.status_line.len = sizeof("200 OK") - 1;