Mercurial > hg > nginx-vendor-current
comparison src/http/ngx_http_header_filter_module.c @ 122:d25a1d6034f1 NGINX_0_3_8
nginx 0.3.8
*) Security: nginx now checks URI got from a backend in
"X-Accel-Redirect" header line or in SSI file for the "/../" paths
and zeroes.
*) Change: nginx now does not treat the empty user name in the
"Authorization" header line as valid one.
*) Feature: the "ssl_session_timeout" directives of the
ngx_http_ssl_module and ngx_imap_ssl_module.
*) Feature: the "auth_http_header" directive of the
ngx_imap_auth_http_module.
*) Feature: the "add_header" directive.
*) Feature: the ngx_http_realip_module.
*) Feature: the new variables to use in the "log_format" directive:
$bytes_sent, $apache_bytes_sent, $status, $time_gmt, $uri,
$request_time, $request_length, $upstream_status,
$upstream_response_time, $gzip_ratio, $uid_got, $uid_set,
$connection, $pipe, and $msec. The parameters in the "%name" form
will be canceled soon.
*) Change: now the false variable values in the "if" directive are the
empty string "" and string starting with "0".
*) Bugfix: while using proxied or FastCGI-server nginx may leave
connections and temporary files with client requests in open state.
*) Bugfix: the worker processes did not flush the buffered logs on
graceful exit.
*) Bugfix: if the request URI was changes by the "rewrite" directive
and the request was proxied in location given by regular expression,
then the incorrect request was transferred to backend; bug appeared
in 0.2.6.
*) Bugfix: the "expires" directive did not remove the previous
"Expires" header.
*) Bugfix: nginx may stop to accept requests if the "rtsig" method and
several worker processes were used.
*) Bugfix: the "\"" and "\'" escape symbols were incorrectly handled in
SSI commands.
*) Bugfix: if the response was ended just after the SSI command and
gzipping was used, then the response did not transferred complete or
did not transferred at all.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 09 Nov 2005 00:00:00 +0300 |
parents | 644a7935144b |
children | 36af50a5582d |
comparison
equal
deleted
inserted
replaced
121:737953b238a4 | 122:d25a1d6034f1 |
---|---|
349 /* "HTTP/1.x " */ | 349 /* "HTTP/1.x " */ |
350 b->last = ngx_cpymem(b->last, "HTTP/1.1 ", sizeof("HTTP/1.x ") - 1); | 350 b->last = ngx_cpymem(b->last, "HTTP/1.1 ", sizeof("HTTP/1.x ") - 1); |
351 | 351 |
352 /* status line */ | 352 /* status line */ |
353 if (r->headers_out.status_line.len) { | 353 if (r->headers_out.status_line.len) { |
354 b->last = ngx_cpymem(b->last, r->headers_out.status_line.data, | 354 b->last = ngx_copy(b->last, r->headers_out.status_line.data, |
355 r->headers_out.status_line.len); | 355 r->headers_out.status_line.len); |
356 | 356 |
357 } else { | 357 } else { |
358 b->last = ngx_cpymem(b->last, ngx_http_status_lines[status].data, | 358 b->last = ngx_copy(b->last, ngx_http_status_lines[status].data, |
359 ngx_http_status_lines[status].len); | 359 ngx_http_status_lines[status].len); |
360 } | 360 } |
361 *b->last++ = CR; *b->last++ = LF; | 361 *b->last++ = CR; *b->last++ = LF; |
362 | 362 |
363 if (r->headers_out.server == NULL) { | 363 if (r->headers_out.server == NULL) { |
364 b->last = ngx_cpymem(b->last, ngx_http_server_string, | 364 b->last = ngx_cpymem(b->last, ngx_http_server_string, |
375 | 375 |
376 if (r->headers_out.content_type.len) { | 376 if (r->headers_out.content_type.len) { |
377 b->last = ngx_cpymem(b->last, "Content-Type: ", | 377 b->last = ngx_cpymem(b->last, "Content-Type: ", |
378 sizeof("Content-Type: ") - 1); | 378 sizeof("Content-Type: ") - 1); |
379 p = b->last; | 379 p = b->last; |
380 b->last = ngx_cpymem(b->last, r->headers_out.content_type.data, | 380 b->last = ngx_copy(b->last, r->headers_out.content_type.data, |
381 r->headers_out.content_type.len); | 381 r->headers_out.content_type.len); |
382 | 382 |
383 if (r->headers_out.charset.len) { | 383 if (r->headers_out.charset.len) { |
384 b->last = ngx_cpymem(b->last, "; charset=", | 384 b->last = ngx_cpymem(b->last, "; charset=", |
385 sizeof("; charset=") - 1); | 385 sizeof("; charset=") - 1); |
386 b->last = ngx_cpymem(b->last, r->headers_out.charset.data, | 386 b->last = ngx_copy(b->last, r->headers_out.charset.data, |
387 r->headers_out.charset.len); | 387 r->headers_out.charset.len); |
388 | 388 |
389 /* update r->headers_out.content_type for possible logging */ | 389 /* update r->headers_out.content_type for possible logging */ |
390 | 390 |
391 r->headers_out.content_type.len = b->last - p; | 391 r->headers_out.content_type.len = b->last - p; |
392 r->headers_out.content_type.data = p; | 392 r->headers_out.content_type.data = p; |
426 *b->last++ ='s'; | 426 *b->last++ ='s'; |
427 } | 427 } |
428 #endif | 428 #endif |
429 | 429 |
430 *b->last++ = ':'; *b->last++ = '/'; *b->last++ = '/'; | 430 *b->last++ = ':'; *b->last++ = '/'; *b->last++ = '/'; |
431 b->last = ngx_cpymem(b->last, r->server_name.data, | 431 b->last = ngx_copy(b->last, r->server_name.data, r->server_name.len); |
432 r->server_name.len); | |
433 | 432 |
434 if (clcf->port_in_redirect) { | 433 if (clcf->port_in_redirect) { |
435 #if (NGX_HTTP_SSL) | 434 #if (NGX_HTTP_SSL) |
436 if (r->connection->ssl) { | 435 if (r->connection->ssl) { |
437 if (r->port != 443) { | 436 if (r->port != 443) { |
438 b->last = ngx_cpymem(b->last, r->port_text->data, | 437 b->last = ngx_copy(b->last, r->port_text->data, |
439 r->port_text->len); | 438 r->port_text->len); |
440 } | 439 } |
441 } else | 440 } else |
442 #endif | 441 #endif |
443 { | 442 { |
444 if (r->port != 80) { | 443 if (r->port != 80) { |
445 b->last = ngx_cpymem(b->last, r->port_text->data, | 444 b->last = ngx_copy(b->last, r->port_text->data, |
446 r->port_text->len); | 445 r->port_text->len); |
447 } | 446 } |
448 } | 447 } |
449 } | 448 } |
450 | 449 |
451 b->last = ngx_cpymem(b->last, r->headers_out.location->value.data, | 450 b->last = ngx_copy(b->last, r->headers_out.location->value.data, |
452 r->headers_out.location->value.len); | 451 r->headers_out.location->value.len); |
453 | 452 |
454 /* update r->headers_out.location->value for possible logging */ | 453 /* update r->headers_out.location->value for possible logging */ |
455 | 454 |
456 r->headers_out.location->value.len = b->last - p; | 455 r->headers_out.location->value.len = b->last - p; |
457 r->headers_out.location->value.data = p; | 456 r->headers_out.location->value.data = p; |
495 | 494 |
496 if (header[i].hash == 0) { | 495 if (header[i].hash == 0) { |
497 continue; | 496 continue; |
498 } | 497 } |
499 | 498 |
500 b->last = ngx_cpymem(b->last, header[i].key.data, header[i].key.len); | 499 b->last = ngx_copy(b->last, header[i].key.data, header[i].key.len); |
501 *b->last++ = ':' ; *b->last++ = ' ' ; | 500 *b->last++ = ':' ; *b->last++ = ' ' ; |
502 | 501 |
503 b->last = ngx_cpymem(b->last, header[i].value.data, | 502 b->last = ngx_copy(b->last, header[i].value.data, header[i].value.len); |
504 header[i].value.len); | |
505 *b->last++ = CR; *b->last++ = LF; | 503 *b->last++ = CR; *b->last++ = LF; |
506 } | 504 } |
507 | 505 |
508 #if (NGX_DEBUG) | 506 #if (NGX_DEBUG) |
509 *b->last = '\0'; | 507 *b->last = '\0'; |