diff src/http/modules/ngx_http_fastcgi_module.c @ 639:715d24327080 release-0.3.41

nginx-0.3.41-RELEASE import *) 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 <igor@sysoev.ru>
date Fri, 21 Apr 2006 12:06:44 +0000
parents e60fe4cf1d4e
children 1e720b0be7ec
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;