# HG changeset patch # User Igor Sysoev # Date 1197493517 0 # Node ID 9e04d3259096a94812c10a89b5fd9f3d0f0bfd55 # Parent d1b075a0f7a2db5066379a593773350bdcda32b4 r1657 merge: log entire request line instead of URI only diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -2599,28 +2599,21 @@ ngx_http_log_error_handler(ngx_http_requ buf = p; } - if (r->unparsed_uri.data) { - p = ngx_snprintf(buf, len, ", URL: \"%V\"", &r->unparsed_uri); + if (r->request_line.data == NULL && r->request_start) { + for (p = r->request_start; p < r->header_in->last; p++) { + if (*p == CR || *p == LF) { + break; + } + } + + r->request_line.len = p - r->request_start; + r->request_line.data = r->request_start; + } + + if (r->request_line.len) { + p = ngx_snprintf(buf, len, ", request: \"%V\"", &r->request_line); len -= p - buf; buf = p; - - } else { - if (r->request_line.data == NULL && r->request_start) { - for (p = r->request_start; p < r->header_in->last; p++) { - if (*p == CR || *p == LF) { - break; - } - } - - r->request_line.len = p - r->request_start; - r->request_line.data = r->request_start; - } - - if (r->request_line.len) { - p = ngx_snprintf(buf, len, ", request: \"%V\"", &r->request_line); - len -= p - buf; - buf = p; - } } if (r != sr) {