comparison src/http/modules/ngx_http_fastcgi_module.c @ 396:77df96611112

Merge with current.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 05 Aug 2008 02:12:51 +0400
parents 34fb3a573548
children a094317ba307
comparison
equal deleted inserted replaced
391:1d9bef53cd8e 396:77df96611112
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";