From 66ba32c87944b0efb45dc3c3122cdc31ed5d9399 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 1 Jun 2010 20:24:30 +0000 Subject: [PATCH] improve uwsgi_string processing --- src/http/modules/ngx_http_uwsgi_module.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/http/modules/ngx_http_uwsgi_module.c b/src/http/modules/ngx_http_uwsgi_module.c index 2531ef47c..ade82070c 100644 --- a/src/http/modules/ngx_http_uwsgi_module.c +++ b/src/http/modules/ngx_http_uwsgi_module.c @@ -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;