comparison src/http/ngx_http_request.c @ 1811:0d9c6fe7502b

axe useless r->server_name
author Igor Sysoev <igor@sysoev.ru>
date Sun, 30 Dec 2007 08:15:27 +0000
parents 755e09d5c271
children 8f8b66a48494
comparison
equal deleted inserted replaced
1810:755e09d5c271 1811:0d9c6fe7502b
338 338
339 r->main_conf = cscf->ctx->main_conf; 339 r->main_conf = cscf->ctx->main_conf;
340 r->srv_conf = cscf->ctx->srv_conf; 340 r->srv_conf = cscf->ctx->srv_conf;
341 r->loc_conf = cscf->ctx->loc_conf; 341 r->loc_conf = cscf->ctx->loc_conf;
342 342
343 r->server_name = cscf->server_name;
344
345 rev->handler = ngx_http_process_request_line; 343 rev->handler = ngx_http_process_request_line;
346 344
347 #if (NGX_HTTP_SSL) 345 #if (NGX_HTTP_SSL)
348 346
349 { 347 {
1510 1508
1511 return; 1509 return;
1512 1510
1513 found: 1511 found:
1514 1512
1515 r->server_name.len = len;
1516 r->server_name.data = host;
1517
1518 r->srv_conf = cscf->ctx->srv_conf; 1513 r->srv_conf = cscf->ctx->srv_conf;
1519 r->loc_conf = cscf->ctx->loc_conf; 1514 r->loc_conf = cscf->ctx->loc_conf;
1520 1515
1521 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); 1516 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
1522 r->connection->log->file = clcf->err_log->file; 1517 r->connection->log->file = clcf->err_log->file;
2603 2598
2604 static u_char * 2599 static u_char *
2605 ngx_http_log_error_handler(ngx_http_request_t *r, ngx_http_request_t *sr, 2600 ngx_http_log_error_handler(ngx_http_request_t *r, ngx_http_request_t *sr,
2606 u_char *buf, size_t len) 2601 u_char *buf, size_t len)
2607 { 2602 {
2608 char *uri_separator; 2603 char *uri_separator;
2609 u_char *p; 2604 u_char *p;
2610 ngx_http_upstream_t *u; 2605 ngx_http_upstream_t *u;
2611 2606 ngx_http_core_srv_conf_t *cscf;
2612 if (r->server_name.data) { 2607
2613 p = ngx_snprintf(buf, len, ", server: %V", &r->server_name); 2608 cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
2614 len -= p - buf; 2609
2615 buf = p; 2610 p = ngx_snprintf(buf, len, ", server: %V", &cscf->server_name);
2616 } 2611 len -= p - buf;
2612 buf = p;
2617 2613
2618 if (r->request_line.data == NULL && r->request_start) { 2614 if (r->request_line.data == NULL && r->request_start) {
2619 for (p = r->request_start; p < r->header_in->last; p++) { 2615 for (p = r->request_start; p < r->header_in->last; p++) {
2620 if (*p == CR || *p == LF) { 2616 if (*p == CR || *p == LF) {
2621 break; 2617 break;