httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lyudmila L. Balakireva" <>
Subject [users@httpd] output_filter apr_bucket_read
Date Wed, 12 Oct 2011 16:54:16 GMT
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_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
  (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


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message