Mercurial > hg > nginx-vendor-0-8
comparison src/http/ngx_http_variables.c @ 258:6ae1357b7b7c NGINX_0_4_14
nginx 0.4.14
*) Feature: the "proxy_pass_error_message" directive in IMAP/POP3 proxy.
*) Feature: now configure detects system PCRE library on FreeBSD,
Linux, and NetBSD.
*) Bugfix: ngx_http_perl_module did not work with perl built with the
threads support; bug appeared in 0.3.38.
*) Bugfix: ngx_http_perl_module did not work if perl was called
recursively.
*) Bugfix: nginx ignored a host name in an request line.
*) Bugfix: a worker process may got caught in an endless loop, if a
FastCGI server sent too many data to the stderr.
*) Bugfix: the $upstream_response_time variable may be negative if the
system time was changed backward.
*) Bugfix: the "Auth-Login-Attempt" parameter was not sent to IMAP/POP3
proxy authentication server when POP3 was used.
*) Bugfix: a segmentation fault might occur if connect to IMAP/POP3
proxy authentication server failed.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 27 Nov 2006 00:00:00 +0300 |
parents | fbf2b2f66c9f |
children | 6eb1e38f0f1f |
comparison
equal
deleted
inserted
replaced
257:0e566ee1bcd5 | 258:6ae1357b7b7c |
---|---|
665 | 665 |
666 static ngx_int_t | 666 static ngx_int_t |
667 ngx_http_variable_host(ngx_http_request_t *r, ngx_http_variable_value_t *v, | 667 ngx_http_variable_host(ngx_http_request_t *r, ngx_http_variable_value_t *v, |
668 uintptr_t data) | 668 uintptr_t data) |
669 { | 669 { |
670 if (r->headers_in.host) { | 670 if (r->host_start == NULL) { |
671 v->len = r->headers_in.host_name_len; | 671 |
672 v->data = r->headers_in.host->value.data; | 672 if (r->headers_in.host) { |
673 v->len = r->headers_in.host_name_len; | |
674 v->data = r->headers_in.host->value.data; | |
675 | |
676 } else { | |
677 v->len = r->server_name.len; | |
678 v->data = r->server_name.data; | |
679 } | |
673 | 680 |
674 } else { | 681 } else { |
675 v->len = r->server_name.len; | 682 v->len = r->host_end - r->host_start; |
676 v->data = r->server_name.data; | 683 v->data = r->host_start; |
677 } | 684 } |
678 | 685 |
679 v->valid = 1; | 686 v->valid = 1; |
680 v->no_cachable = 0; | 687 v->no_cachable = 0; |
681 v->not_found = 0; | 688 v->not_found = 0; |