httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Drew Bertola <>
Subject Meaning of len returned by apr_bucket_read()...
Date Fri, 19 Jan 2007 08:57:24 GMT

When I run:

  apr_bucket_read(b, &str, &len, APR_NONBLOCK_READ);
and follow that with:
  fprintf(stderr, "strlen(str): %d, len: %d\n", strlen(str), len);

I see that strlen(str) and len are not always the same.  Why?

I know what the docs say:
 * read the data from the bucket
 * @param e The bucket to read from
 * @param str The location to store the data in
 * @param len The amount of data read
 * @param block Whether the read function blocks
#define apr_bucket_read(e,str,len,block) (e)->type->read(e, str, len, block)

But what does len represent?


View raw message