]> git.kaiwu.me - nginx.git/commitdiff
improve uwsgi_string processing
authorIgor Sysoev <igor@sysoev.ru>
Tue, 1 Jun 2010 20:24:30 +0000 (20:24 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 1 Jun 2010 20:24:30 +0000 (20:24 +0000)
src/http/modules/ngx_http_uwsgi_module.c

index 2531ef47c8cd1277a28a0b0119188fe78756b9a2..ade82070c192c9d276bd6a636eeb3da4506e9dcd 100644 (file)
@@ -476,9 +476,7 @@ ngx_http_uwsgi_create_request(ngx_http_request_t *r)
         }
     }
 
-    if (uwcf->uwsgi_string.data && uwcf->uwsgi_string.len) {
-        len += uwcf->uwsgi_string.len;
-    }
+    len += uwcf->uwsgi_string.len;
 
 #if 0
     /* allow custom uwsgi packet */
@@ -588,10 +586,8 @@ ngx_http_uwsgi_create_request(ngx_http_request_t *r)
         }
     }
 
-    if (uwcf->uwsgi_string.data && uwcf->uwsgi_string.len) {
-        b->last = ngx_copy(b->last, uwcf->uwsgi_string.data,
-                           uwcf->uwsgi_string.len);
-    }
+    b->last = ngx_copy(b->last, uwcf->uwsgi_string.data,
+                       uwcf->uwsgi_string.len);
 
     if (uwcf->upstream.pass_request_body) {
         body = r->upstream->request_bufs;