diff src/http/modules/ngx_http_fastcgi_module.c @ 188:af37b7cb6698 NGINX_0_3_41

nginx 0.3.41 *) Feature: the -v switch. *) Bugfix: the segmentation fault may occurred if the SSI page has remote subrequests. *) Bugfix: in FastCGI handling. *) Bugfix: if the perl modules path was not set using --with-perl_modules_path=PATH or the "perl_modules", then the segmentation fault was occurred.
author Igor Sysoev <http://sysoev.ru>
date Fri, 21 Apr 2006 00:00:00 +0400
parents 54aabf2b0bc6
children e6da4931e0e0
line wrap: on
line diff
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -1173,6 +1173,11 @@ ngx_http_fastcgi_input_filter(ngx_event_
         if (f->type == NGX_HTTP_FASTCGI_STDERR) {
 
             if (f->length) {
+
+                if (f->pos == f->last) {
+                    break;
+                }
+
                 line.data = f->pos;
 
                 if (f->pos + f->length <= f->last) {
@@ -1212,6 +1217,10 @@ ngx_http_fastcgi_input_filter(ngx_event_
 
         /* f->type == NGX_HTTP_FASTCGI_STDOUT */
 
+        if (f->pos == f->last) {
+            break;
+        }
+
         if (p->free) {
             b = p->free->buf;
             p->free = p->free->next;