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/server core.c
Date Tue, 31 Aug 2004 08:16:57 GMT
jorton      2004/08/31 01:16:57

  Modified:    .        Tag: APACHE_2_0_BRANCH STATUS
               server   Tag: APACHE_2_0_BRANCH core.c
  Log:
  Backport from HEAD:
  
  * server/core.c (core_output_filter): Don't explicitly delete the EOC
  bucket, and don't buffer the brigade if it ends in an EOC.
  
  Reviewed by: trawick, nd
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.751.2.1035 +7 -6      httpd-2.0/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/STATUS,v
  retrieving revision 1.751.2.1034
  retrieving revision 1.751.2.1035
  diff -d -w -u -r1.751.2.1034 -r1.751.2.1035
  --- STATUS	28 Aug 2004 16:20:08 -0000	1.751.2.1034
  +++ STATUS	31 Aug 2004 08:16:56 -0000	1.751.2.1035
  @@ -78,15 +78,16 @@
             modules/mappers/mod_rewrite.c: r1.259
           +1: nd
   
  -    *) EOC bucket handling fix for core_output_filter (prevents possible variable use-
  -       after-free since .49).
  -       http://cvs.apache.org/viewcvs.cgi/httpd-2.0/server/core.c?r1=1.276&r2=1.277
  -       +1: jorton, trawick, nd
  -       
       *) Don't link suexec against APR/etc libraries.
          http://cvs.apache.org/viewcvs.cgi/httpd-2.0/support/Makefile.in?r1=1.38&r2=1.39
          +1: jorton, trawick
          nd: what about the need of -static (dunno)?
  +       jorton: -static was needed only to make sure libapr etc were linked statically
  +       into suexec; they didn't work shared in a binary distribution because
  +       LD_LIBRARY_PATH etc are ignored for a setuid binary (that only matters
  +       for binary distributors where suexec gets relocated, since libtool 
  +       puts an appropriate RPATH in the binary).  Not linking suexec against libapr 
  +       etc avoids the issue entirely (and avoids scary >1Mb suexec binaries)
   
       *) mod_headers: Support {...}s tag for SSL variable lookup.
          http://www.apache.org/~jorton/mod_headers-2.0-ssl.diff
  
  
  
  No                   revision
  No                   revision
  1.225.2.27 +4 -5      httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.225.2.26
  retrieving revision 1.225.2.27
  diff -d -w -u -r1.225.2.26 -r1.225.2.27
  --- core.c	26 Aug 2004 22:16:53 -0000	1.225.2.26
  +++ core.c	31 Aug 2004 08:16:56 -0000	1.225.2.27
  @@ -3947,12 +3947,9 @@
           APR_BRIGADE_FOREACH(e, b) {
               /* keep track of the last bucket processed */
               last_e = e;
  -            if (APR_BUCKET_IS_EOS(e)) {
  +            if (APR_BUCKET_IS_EOS(e) || AP_BUCKET_IS_EOC(e)) {
                   break;
               }
  -            if (AP_BUCKET_IS_EOC(e)) {
  -                apr_bucket_delete(e);
  -            }
               else if (APR_BUCKET_IS_FLUSH(e)) {
                   if (e != APR_BRIGADE_LAST(b)) {
                       more = apr_brigade_split(b, APR_BUCKET_NEXT(e));
  @@ -4108,7 +4105,8 @@
           /* Completed iterating over the brigade, now determine if we want
            * to buffer the brigade or send the brigade out on the network.
            *
  -         * Save if we haven't accumulated enough bytes to send, and:
  +         * Save if we haven't accumulated enough bytes to send, the connection
  +         * is not about to be closed, and:
            *
            *   1) we didn't see a file, we don't have more passes over the
            *      brigade to perform,  AND we didn't stop at a FLUSH bucket.
  @@ -4119,6 +4117,7 @@
            *       with the hope of concatenating with another response)
            */
           if (nbytes + flen < AP_MIN_BYTES_TO_WRITE
  +            && !AP_BUCKET_IS_EOC(last_e)
               && ((!fd && !more && !APR_BUCKET_IS_FLUSH(last_e))
                   || (APR_BUCKET_IS_EOS(last_e)
                       && c->keepalive == AP_CONN_KEEPALIVE))) {
  
  
  

Mime
View raw message