httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giuliano Gavazzi <dev-apache....@humph.com>
Subject Re: Meaning of len returned by apr_bucket_read()...
Date Fri, 19 Jan 2007 10:16:00 GMT

On 19 Jan 2007, at 09:57, Drew Bertola wrote:

> Hello,
>
> 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?

if the data you read can contain nulls I would expect that. At the  
same time, is it safe to call strlen on it? That is, is the data  
always null terminated?

g

Mime
View raw message