httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: httpd-2.0/server core.c
Date Sun, 20 Jan 2002 11:37:08 GMT
jerenkrantz    02/01/20 03:37:07

  Modified:    server   core.c
  Log:
  Add AP_MODE_SPECULATIVE support to core_input_filter
  
  Revision  Changes    Path
  1.132     +16 -2     httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.131
  retrieving revision 1.132
  diff -u -r1.131 -r1.132
  --- core.c	19 Jan 2002 07:45:18 -0000	1.131
  +++ core.c	20 Jan 2002 11:37:07 -0000	1.132
  @@ -3115,7 +3115,7 @@
           return APR_SUCCESS;
       }
       /* read up to the amount they specified. */
  -    if (mode == AP_MODE_READBYTES) {
  +    if (mode == AP_MODE_READBYTES || mode == AP_MODE_SPECULATIVE) {
           apr_off_t total;
           apr_bucket *e;
           apr_bucket_brigade *newbb;
  @@ -3142,7 +3142,21 @@
   
           /* Must do split before CONCAT */
           newbb = apr_brigade_split(ctx->b, e);
  -        APR_BRIGADE_CONCAT(b, ctx->b);
  +
  +        if (mode == AP_MODE_READBYTES) {
  +            APR_BRIGADE_CONCAT(b, ctx->b);
  +        }
  +        else if (mode == AP_MODE_SPECULATIVE) {
  +            apr_bucket *copy_bucket;
  +            APR_BRIGADE_FOREACH(e, ctx->b) {
  +                rv = apr_bucket_copy(e, &copy_bucket);
  +                if (rv != APR_SUCCESS) {
  +                    return rv;
  +                }
  +                APR_BRIGADE_INSERT_TAIL(b, copy_bucket);
  +            }
  +        }
  +
           /* Take what was originally there and place it back on ctx->b */
           APR_BRIGADE_CONCAT(ctx->b, newbb);
   
  
  
  

Mime
View raw message