I am working on output_filter
I have question about reading data.  I am reading data with similar
technic like mod_dumpio,
but when testing with large pdf file, I have less data in apr_bucket_read
, then b->length indicates.
It seems some buffer size limit for reading exists.

how should I get all data out of b? any existing example ?
(I am not manipulating data in buckets at all, just forwarding them to
next filter).


  for (b = APR_BRIGADE_FIRST(bb); b != APR_BRIGADE_SENTINEL(bb); b =
APR_BUCKET_NEXT(b)) {

       apr_size_t bsize =  b->length;

   if (!(APR_BUCKET_IS_METADATA(b))) {

   if (apr_bucket_read(b, &buf, &nbytes, APR_BLOCK_READ) == APR_SUCCESS) {
       if  (nbytes) {

       do something with buf
      }
   }
}
}
printout of buckets:
(data-HEAP as b->length): 254 bytes
 nbytes:254
  (data-FILE): 11563137 bytes
 length from nbytes:4194304
 (data-FILE): 7368833 bytes
 length from nbytes:4194304
 (data-FILE): 3174529 bytes
 length from nbytes:3174529
 mod_ta:   (metadata-EOS): 0 bytes

thanks,
Lyudmila

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to