]> git.kaiwu.me - nginx.git/commitdiff
Upstream: slightly optimized ngx_http_upstream_process_header().
authorRuslan Ermilov <ru@nginx.com>
Tue, 21 May 2013 08:54:27 +0000 (12:54 +0400)
committerRuslan Ermilov <ru@nginx.com>
Tue, 21 May 2013 08:54:27 +0000 (12:54 +0400)
src/http/ngx_http_upstream.c

index ae71a11967e6836e840a86114b0beb77b283dce0..85fc849e7f620630ed2c1951f1d5d0aa261c7722 100644 (file)
@@ -1709,11 +1709,11 @@ ngx_http_upstream_process_header(ngx_http_request_t *r, ngx_http_upstream_t *u)
             ngx_http_upstream_finalize_request(r, u, NGX_ERROR);
             return;
         }
+    }
 
-        if (u->length == 0) {
-            ngx_http_upstream_finalize_request(r, u, 0);
-            return;
-        }
+    if (u->length == 0) {
+        ngx_http_upstream_finalize_request(r, u, 0);
+        return;
     }
 
     u->read_event_handler = ngx_http_upstream_process_body_in_memory;