# HG changeset patch # User Igor Sysoev # Date 1196166121 0 # Node ID 7a9b44e35c53a2a10f3bcce8542493248f092052 # Parent b318cdca3aac23b1ac4d61882ff2b6b6f0c485da 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 @@ -2613,28 +2613,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) {