comparison 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
comparison
equal deleted inserted replaced
391:4ec606a899d3 392:34fb3a573548
1118 1118
1119 if (h->key.len == r->lowcase_index) { 1119 if (h->key.len == r->lowcase_index) {
1120 ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len); 1120 ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len);
1121 1121
1122 } else { 1122 } else {
1123 for (i = 0; i < h->key.len; i++) { 1123 ngx_strlow(h->lowcase_key, h->key.data, h->key.len);
1124 h->lowcase_key[i] = ngx_tolower(h->key.data[i]);
1125 }
1126 } 1124 }
1127 1125
1128 hh = ngx_hash_find(&umcf->headers_in_hash, h->hash, 1126 hh = ngx_hash_find(&umcf->headers_in_hash, h->hash,
1129 h->lowcase_key, h->key.len); 1127 h->lowcase_key, h->key.len);
1130 1128
1164 return NGX_HTTP_UPSTREAM_INVALID_HEADER; 1162 return NGX_HTTP_UPSTREAM_INVALID_HEADER;
1165 } 1163 }
1166 1164
1167 u->headers_in.status_n = status; 1165 u->headers_in.status_n = status;
1168 u->headers_in.status_line = *status_line; 1166 u->headers_in.status_line = *status_line;
1167
1168 } else if (u->headers_in.location) {
1169 u->headers_in.status_n = 302;
1170 u->headers_in.status_line.len =
1171 sizeof("302 Moved Temporarily") - 1;
1172 u->headers_in.status_line.data =
1173 (u_char *) "302 Moved Temporarily";
1169 1174
1170 } else { 1175 } else {
1171 u->headers_in.status_n = 200; 1176 u->headers_in.status_n = 200;
1172 u->headers_in.status_line.len = sizeof("200 OK") - 1; 1177 u->headers_in.status_line.len = sizeof("200 OK") - 1;
1173 u->headers_in.status_line.data = (u_char *) "200 OK"; 1178 u->headers_in.status_line.data = (u_char *) "200 OK";