diff options
author | Igor Sysoev <igor@sysoev.ru> | 2007-11-27 12:22:01 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2007-11-27 12:22:01 +0000 |
commit | a6b5957f92fb92d2e7a18b2bec4a91a0e88a28bc (patch) | |
tree | 3fd8cd90b99cf137d300e795d466e196ad7353bc | |
parent | 98b5a3b15b95c04a352fbad0867a37eabb20747d (diff) | |
download | nginx-a6b5957f92fb92d2e7a18b2bec4a91a0e88a28bc.tar.gz nginx-a6b5957f92fb92d2e7a18b2bec4a91a0e88a28bc.zip |
log entire request line instead of URI only
-rw-r--r-- | src/http/ngx_http_request.c | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 86f244629..e3988ff22 100644 --- 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_request_t *r, ngx_http_request_t *sr, buf = p; } - if (r->unparsed_uri.data) { - p = ngx_snprintf(buf, len, ", URL: \"%V\"", &r->unparsed_uri); - 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; - } + 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; - } + 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) { |