httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apache-2.0/src/main http_protocol.c
Date Fri, 03 Nov 2000 16:38:35 GMT
trawick     00/11/03 08:38:33

  Modified:    src/main http_protocol.c
  Log:
  Change the content-length filter to give up (i.e., not provide content-length)
  if it gets a flush bucket.  A generator of streaming content needs to send down
  a flush bucket (e.g., by calling ap_rflush()) if it wants to send a partial
  response to the client immediately.
  
  Revision  Changes    Path
  1.223     +13 -0     apache-2.0/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_protocol.c,v
  retrieving revision 1.222
  retrieving revision 1.223
  diff -u -r1.222 -r1.223
  --- http_protocol.c	2000/11/02 22:53:57	1.222
  +++ http_protocol.c	2000/11/03 16:38:28	1.223
  @@ -2298,6 +2298,19 @@
           return ap_pass_brigade(f->next, b);
       }
   
  +    /* check for flush bucket... if there is one, we have to scratch
  +     * the idea of providing content length because the output should
  +     * flow immediately (for streaming dynamic content)
  +     */
  +
  +    AP_BRIGADE_FOREACH(e, b) {
  +        if (AP_BUCKET_IS_FLUSH(e)) {
  +            AP_BRIGADE_CONCAT(ctx->saved, b);
  +            ap_remove_output_filter(f);
  +            return ap_pass_brigade(f->next, ctx->saved);
  +        }
  +    }
  +
       /* save the brigade; we can't pass any data to the next
        * filter until we have the entire content length
        */
  
  
  

Mime
View raw message