Mercurial > hg > nginx-vendor-0-7
comparison src/http/ngx_http_request.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 |
---|---|
82 { ngx_string("Keep-Alive"), offsetof(ngx_http_headers_in_t, keep_alive) }, | 82 { ngx_string("Keep-Alive"), offsetof(ngx_http_headers_in_t, keep_alive) }, |
83 | 83 |
84 #if (NGX_HTTP_PROXY) | 84 #if (NGX_HTTP_PROXY) |
85 { ngx_string("X-Forwarded-For"), | 85 { ngx_string("X-Forwarded-For"), |
86 offsetof(ngx_http_headers_in_t, x_forwarded_for) }, | 86 offsetof(ngx_http_headers_in_t, x_forwarded_for) }, |
87 { ngx_string("X-Real-IP"), offsetof(ngx_http_headers_in_t, x_real_ip) }, | |
88 { ngx_string("X-URL"), offsetof(ngx_http_headers_in_t, x_url) }, | |
87 #endif | 89 #endif |
88 | 90 |
89 { ngx_null_string, 0 } | 91 { ngx_null_string, 0 } |
90 }; | 92 }; |
91 | 93 |
349 } | 351 } |
350 | 352 |
351 #endif | 353 #endif |
352 | 354 |
353 server_name = cscf->server_names.elts; | 355 server_name = cscf->server_names.elts; |
354 r->server_name = &server_name->name; | 356 r->server_name = server_name->name; |
355 | 357 |
356 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); | 358 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); |
357 c->log->file = clcf->err_log->file; | 359 c->log->file = clcf->err_log->file; |
358 if (!(c->log->log_level & NGX_LOG_DEBUG_CONNECTION)) { | 360 if (!(c->log->log_level & NGX_LOG_DEBUG_CONNECTION)) { |
359 c->log->log_level = clcf->err_log->log_level; | 361 c->log->log_level = clcf->err_log->log_level; |
1120 } | 1122 } |
1121 } | 1123 } |
1122 | 1124 |
1123 r->srv_conf = name[i].core_srv_conf->ctx->srv_conf; | 1125 r->srv_conf = name[i].core_srv_conf->ctx->srv_conf; |
1124 r->loc_conf = name[i].core_srv_conf->ctx->loc_conf; | 1126 r->loc_conf = name[i].core_srv_conf->ctx->loc_conf; |
1125 r->server_name = &name[i].name; | 1127 |
1128 if (name[i].wildcard) { | |
1129 r->server_name.len = r->headers_in.host_name_len; | |
1130 r->server_name.data = r->headers_in.host->value.data; | |
1131 | |
1132 } else { | |
1133 r->server_name = name[i].name; | |
1134 } | |
1126 | 1135 |
1127 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); | 1136 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); |
1128 r->connection->log->file = clcf->err_log->file; | 1137 r->connection->log->file = clcf->err_log->file; |
1129 | 1138 |
1130 if (!(r->connection->log->log_level & NGX_LOG_DEBUG_CONNECTION)) { | 1139 if (!(r->connection->log->log_level & NGX_LOG_DEBUG_CONNECTION)) { |