[nginx] svn commit: r4616 - trunk/src/http/modules
mdounin at mdounin.ru
mdounin at mdounin.ru
Fri May 11 13:09:24 UTC 2012
Author: mdounin
Date: 2012-05-11 13:09:24 +0000 (Fri, 11 May 2012)
New Revision: 4616
URL: http://trac.nginx.org/nginx/changeset/4616/nginx
Log:
Added r->state reset on fastcgi/scgi/uwsgi request start.
Failing to do so results in problems if 400 or 414 requests are
redirected to fastcgi/scgi/uwsgi upstream, as well as after invalid
headers got from upstream. This was already fixed for proxy in r3478,
but fastcgi (the only affected protocol at that time) was missed.
Reported by Matthieu Tourne.
Modified:
trunk/src/http/modules/ngx_http_fastcgi_module.c
trunk/src/http/modules/ngx_http_scgi_module.c
trunk/src/http/modules/ngx_http_uwsgi_module.c
Modified: trunk/src/http/modules/ngx_http_fastcgi_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_fastcgi_module.c 2012-05-04 11:35:22 UTC (rev 4615)
+++ trunk/src/http/modules/ngx_http_fastcgi_module.c 2012-05-11 13:09:24 UTC (rev 4616)
@@ -619,6 +619,7 @@
u->process_header = ngx_http_fastcgi_process_header;
u->abort_request = ngx_http_fastcgi_abort_request;
u->finalize_request = ngx_http_fastcgi_finalize_request;
+ r->state = 0;
u->buffering = 1;
@@ -1194,6 +1195,8 @@
f->fastcgi_stdout = 0;
f->large_stderr = 0;
+ r->state = 0;
+
return NGX_OK;
}
Modified: trunk/src/http/modules/ngx_http_scgi_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_scgi_module.c 2012-05-04 11:35:22 UTC (rev 4615)
+++ trunk/src/http/modules/ngx_http_scgi_module.c 2012-05-11 13:09:24 UTC (rev 4616)
@@ -434,6 +434,7 @@
u->process_header = ngx_http_scgi_process_status_line;
u->abort_request = ngx_http_scgi_abort_request;
u->finalize_request = ngx_http_scgi_finalize_request;
+ r->state = 0;
u->buffering = scf->upstream.buffering;
@@ -843,6 +844,7 @@
status->end = NULL;
r->upstream->process_header = ngx_http_scgi_process_status_line;
+ r->state = 0;
return NGX_OK;
}
Modified: trunk/src/http/modules/ngx_http_uwsgi_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_uwsgi_module.c 2012-05-04 11:35:22 UTC (rev 4615)
+++ trunk/src/http/modules/ngx_http_uwsgi_module.c 2012-05-11 13:09:24 UTC (rev 4616)
@@ -467,6 +467,7 @@
u->process_header = ngx_http_uwsgi_process_status_line;
u->abort_request = ngx_http_uwsgi_abort_request;
u->finalize_request = ngx_http_uwsgi_finalize_request;
+ r->state = 0;
u->buffering = uwcf->upstream.buffering;
@@ -883,6 +884,7 @@
status->end = NULL;
r->upstream->process_header = ngx_http_uwsgi_process_status_line;
+ r->state = 0;
return NGX_OK;
}
More information about the nginx-devel
mailing list