diff options
author | Igor Sysoev <igor@sysoev.ru> | 2007-12-30 08:15:27 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2007-12-30 08:15:27 +0000 |
commit | feee7265b5f531fb42cca762a3ac0ae765941504 (patch) | |
tree | d3e064e6dc9c6a22bf737d7b90599c98dfbe3efd /src/http/ngx_http_request.c | |
parent | cc5956772bb28f1ca815d2636d44469ba00e687e (diff) | |
download | nginx-feee7265b5f531fb42cca762a3ac0ae765941504.tar.gz nginx-feee7265b5f531fb42cca762a3ac0ae765941504.zip |
axe useless r->server_name
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r-- | src/http/ngx_http_request.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 8a8b5ac97..e3cbcddf7 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -340,8 +340,6 @@ ngx_http_init_request(ngx_event_t *rev) r->srv_conf = cscf->ctx->srv_conf; r->loc_conf = cscf->ctx->loc_conf; - r->server_name = cscf->server_name; - rev->handler = ngx_http_process_request_line; #if (NGX_HTTP_SSL) @@ -1512,9 +1510,6 @@ ngx_http_find_virtual_server(ngx_http_request_t *r, u_char *host, size_t len, found: - r->server_name.len = len; - r->server_name.data = host; - r->srv_conf = cscf->ctx->srv_conf; r->loc_conf = cscf->ctx->loc_conf; @@ -2605,15 +2600,16 @@ static u_char * ngx_http_log_error_handler(ngx_http_request_t *r, ngx_http_request_t *sr, u_char *buf, size_t len) { - char *uri_separator; - u_char *p; - ngx_http_upstream_t *u; + char *uri_separator; + u_char *p; + ngx_http_upstream_t *u; + ngx_http_core_srv_conf_t *cscf; - if (r->server_name.data) { - p = ngx_snprintf(buf, len, ", server: %V", &r->server_name); - len -= p - buf; - buf = p; - } + cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module); + + p = ngx_snprintf(buf, len, ", server: %V", &cscf->server_name); + len -= p - buf; + buf = p; if (r->request_line.data == NULL && r->request_start) { for (p = r->request_start; p < r->header_in->last; p++) { |