]> git.kaiwu.me - nginx.git/commitdiff
log entire request line instead of URI only
authorIgor Sysoev <igor@sysoev.ru>
Tue, 27 Nov 2007 12:22:01 +0000 (12:22 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 27 Nov 2007 12:22:01 +0000 (12:22 +0000)
src/http/ngx_http_request.c

index 86f2446294185be40b7358093bdceca5f59e7455..e3988ff22e8953574ed25bd26749a03b7d7dba82 100644 (file)
@@ -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) {