httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: httpd-2.0/modules/http http_protocol.c
Date Tue, 23 Jan 2001 07:30:13 GMT
rbb         01/01/22 23:30:12

  Modified:    modules/http http_protocol.c
  Log:
  Fix the byterange filter for the case where the bucket can't be
  copied natively.  This will only ever happen if a bucket can be split
  but not copied, because we read the bucket in apr_brigade_partition if
  we can't split it.  Regardless, this is much safer.  This should also fix
  all of the problems with the byterange filter.
  
  Revision  Changes    Path
  1.271     +7 -1      httpd-2.0/modules/http/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v
  retrieving revision 1.270
  retrieving revision 1.271
  diff -u -d -b -w -u -r1.270 -r1.271
  --- http_protocol.c	2001/01/23 05:57:32	1.270
  +++ http_protocol.c	2001/01/23 07:30:11	1.271
  @@ -325,7 +325,13 @@
           ec = e;
           do {
               apr_bucket *foo;
  -            apr_bucket_copy(ec, &foo);
  +            const char *str;
  +            apr_size_t len;
  +
  +            if (apr_bucket_copy(ec, &foo) != APR_SUCCESS) {
  +                apr_bucket_read(ec, &str, &len, APR_BLOCK_READ);
  +                foo = apr_bucket_create_heap(str, len, 0, NULL);
  +            }
               APR_BRIGADE_INSERT_TAIL(bsend, foo);
               ec = APR_BUCKET_NEXT(ec);
           } while (ec != e2);
  
  
  

Mime
View raw message