comparison src/http/ngx_http_header_filter.c @ 6:80ba094c6b3e NGINX_0_1_3

nginx 0.1.3 *) Feature: the ngx_http_autoindex_module and the autoindex directive. *) Feature: the proxy_set_x_url directive. *) Bugfix: proxy module may get caught in an endless loop when sendfile is not used.
author Igor Sysoev <http://sysoev.ru>
date Mon, 25 Oct 2004 00:00:00 +0400
parents 4b2dafa26fe2
children 46833bd150cb
comparison
equal deleted inserted replaced
5:985c56ebe724 6:80ba094c6b3e
218 && r->headers_out.location->value.len 218 && r->headers_out.location->value.len
219 && r->headers_out.location->value.data[0] == '/') 219 && r->headers_out.location->value.data[0] == '/')
220 { 220 {
221 r->headers_out.location->key.len = 0; 221 r->headers_out.location->key.len = 0;
222 len += sizeof("Location: http://") - 1 222 len += sizeof("Location: http://") - 1
223 + r->server_name->len + r->headers_out.location->value.len + 2; 223 + r->server_name.len + r->headers_out.location->value.len + 2;
224 224
225 if (r->port != 80) { 225 if (r->port != 80) {
226 len += r->port_text->len; 226 len += r->port_text->len;
227 } 227 }
228 } 228 }
354 && r->headers_out.location->value.data[0] == '/') 354 && r->headers_out.location->value.data[0] == '/')
355 { 355 {
356 p = b->last + sizeof("Location: ") - 1; 356 p = b->last + sizeof("Location: ") - 1;
357 b->last = ngx_cpymem(b->last, "Location: http://", 357 b->last = ngx_cpymem(b->last, "Location: http://",
358 sizeof("Location: http://") - 1); 358 sizeof("Location: http://") - 1);
359 b->last = ngx_cpymem(b->last, r->server_name->data, 359 b->last = ngx_cpymem(b->last, r->server_name.data,
360 r->server_name->len); 360 r->server_name.len);
361 if (r->port != 80) { 361 if (r->port != 80) {
362 b->last = ngx_cpymem(b->last, r->port_text->data, 362 b->last = ngx_cpymem(b->last, r->port_text->data,
363 r->port_text->len); 363 r->port_text->len);
364 } 364 }
365 365