httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: httpd-2.0/modules/echo mod_echo.c
Date Tue, 15 Jun 2004 20:27:17 GMT
jorton      2004/06/15 13:27:17

  Modified:    modules/echo mod_echo.c
  Log:
  * modules/echo/mod_echo.c (process_echo_connection): Fix brigade
  handling: don't re-use a passed brigade.
  
  Revision  Changes    Path
  1.45      +8 -5      httpd-2.0/modules/echo/mod_echo.c
  
  Index: mod_echo.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/echo/mod_echo.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -d -w -u -r1.44 -r1.45
  --- mod_echo.c	9 Feb 2004 20:29:18 -0000	1.44
  +++ mod_echo.c	15 Jun 2004 20:27:17 -0000	1.45
  @@ -58,9 +58,9 @@
           return DECLINED;
       }
       
  +    do {
       bb = apr_brigade_create(c->pool, c->bucket_alloc);
   
  -    for ( ; ; ) {
           /* Get a single line of input from the client */
           if ((rv = ap_get_brigade(c->input_filters, bb, AP_MODE_GETLINE,
                                    APR_BLOCK_READ, 0) != APR_SUCCESS || 
  @@ -72,8 +72,11 @@
           /* Make sure the data is flushed to the client */
           b = apr_bucket_flush_create(c->bucket_alloc);
           APR_BRIGADE_INSERT_TAIL(bb, b);
  -        ap_pass_brigade(c->output_filters, bb);    
  -    }
  +
  +        /* Send back the data. */
  +        rv = ap_pass_brigade(c->output_filters, bb);
  +    } while (rv == APR_SUCCESS);
  +
       return OK;
   }
   
  
  
  

Mime
View raw message