Quantcast
Channel: Nginx Forum
Viewing all articles
Browse latest Browse all 53287

[nginx] svn commit: r5027 - trunk/src/http/modules

$
0
0
Author: mdounin
Date: 2013-02-01 14:40:19 +0000 (Fri, 01 Feb 2013)
New Revision: 5027
URL: http://trac.nginx.org/nginx/changeset/5027/nginx

Log:
FastCGI: fixed wrong connection close with fastcgi_keep_conn.

With fastcgi_keep_conn it was possible that connection was closed after
FCGI_STDERR record with zero padding and without any further data read yet.
This happended as f->state was set to ngx_http_fastcgi_st_padding and then
"break" happened, resulting in p->length being set to f->padding, i.e. 0
(which in turn resulted in connection close).

Fix is to make sure we continue the loop after f->state is set.


Modified:
trunk/src/http/modules/ngx_http_fastcgi_module.c

Modified: trunk/src/http/modules/ngx_http_fastcgi_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_fastcgi_module.c 2013-02-01 14:38:18 UTC (rev 5026)
+++ trunk/src/http/modules/ngx_http_fastcgi_module.c 2013-02-01 14:40:19 UTC (rev 5027)
@@ -1788,10 +1788,6 @@
"FastCGI sent in stderr: \"%*s\"",
m + 1 - msg, msg);

- if (f->pos == f->last) {
- break;
- }
-
} else {
if (f->padding) {
f->state = ngx_http_fastcgi_st_padding;

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel

Viewing all articles
Browse latest Browse all 53287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>