comparison src/http/ngx_http_header_filter.c @ 457:ded1284520cc release-0.1.3

nginx-0.1.3-RELEASE import *) 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 <igor@sysoev.ru>
date Mon, 25 Oct 2004 15:29:23 +0000
parents 295d97d70c69
children a88a3e4e158f
comparison
equal deleted inserted replaced
456:911c05435a02 457:ded1284520cc
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