Welcome! Log In Create A New Profile

Advanced

[nginx] svn commit: r4664 - in branches/stable-1.2: . src/http/modules

Anonymous User
June 04, 2012 07:02AM
Author: mdounin
Date: 2012-06-04 11:00:34 +0000 (Mon, 04 Jun 2012)
New Revision: 4664
URL: http://trac.nginx.org/nginx/changeset/4664/nginx

Log:
Merge of r4617: fastcgi padding fix.

Fastcgi: fixed padding handling on fixed-size records.

Padding was incorrectly ignored on end request, empty stdout and stderr
fastcgi records. This resulted in protocol desynchronization if fastcgi
application used these records with padding for some reason.

Reported by Ilia Vinokurov.


Modified:
branches/stable-1.2/
branches/stable-1.2/src/http/modules/ngx_http_fastcgi_module.c

Index: branches/stable-1.2
===================================================================
--- branches/stable-1.2 2012-06-04 10:54:48 UTC (rev 4663)
+++ branches/stable-1.2 2012-06-04 11:00:34 UTC (rev 4664)

Property changes on: branches/stable-1.2
___________________________________________________________________
Modified: svn:mergeinfo
## -1 +1 ##
-/trunk:4611-4613,4615-4616,4620
+/trunk:4611-4613,4615-4617,4620
\ No newline at end of property
Modified: branches/stable-1.2/src/http/modules/ngx_http_fastcgi_module.c
===================================================================
--- branches/stable-1.2/src/http/modules/ngx_http_fastcgi_module.c 2012-06-04 10:54:48 UTC (rev 4663)
+++ branches/stable-1.2/src/http/modules/ngx_http_fastcgi_module.c 2012-06-04 11:00:34 UTC (rev 4664)
@@ -1356,7 +1356,11 @@
}

} else {
- f->state = ngx_http_fastcgi_st_version;
+ if (f->padding) {
+ f->state = ngx_http_fastcgi_st_padding;
+ } else {
+ f->state = ngx_http_fastcgi_st_version;
+ }
}

continue;
@@ -1689,8 +1693,13 @@
}

if (f->type == NGX_HTTP_FASTCGI_STDOUT && f->length == 0) {
- f->state = ngx_http_fastcgi_st_version;

+ if (f->padding) {
+ f->state = ngx_http_fastcgi_st_padding;
+ } else {
+ f->state = ngx_http_fastcgi_st_version;
+ }
+
if (!flcf->keep_conn) {
p->upstream_done = 1;
}
@@ -1702,7 +1711,13 @@
}

if (f->type == NGX_HTTP_FASTCGI_END_REQUEST) {
- f->state = ngx_http_fastcgi_st_version;
+
+ if (f->padding) {
+ f->state = ngx_http_fastcgi_st_padding;
+ } else {
+ f->state = ngx_http_fastcgi_st_version;
+ }
+
p->upstream_done = 1;

if (flcf->keep_conn) {
@@ -1775,7 +1790,11 @@
}

} else {
- f->state = ngx_http_fastcgi_st_version;
+ if (f->padding) {
+ f->state = ngx_http_fastcgi_st_padding;
+ } else {
+ f->state = ngx_http_fastcgi_st_version;
+ }
}

continue;

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] svn commit: r4664 - in branches/stable-1.2: . src/http/modules

Anonymous User 1022 June 04, 2012 07:02AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 186
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready