Re: [users@httpd] apr_bucket_split data remains

2018-01-02 Thread Simon Walter
On 01/02/2018 09:10 PM, Yann Ylavic wrote: > printf("%.*s", (int)len, str) Now I understand that part of the man page. Very nice of you, Yann. Thank you. - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional

Re: [users@httpd] apr_bucket_split data remains

2018-01-02 Thread Yann Ylavic
On Tue, Jan 2, 2018 at 12:45 PM, Simon Walter wrote: > > It looks like apr_bucket_read returns the memory location of the > original string and does no manipulation like null termination when > splitting. > > So I guess that I cannot simply call printf, and that I must either use > putchar with a

Re: [users@httpd] apr_bucket_split data remains

2018-01-02 Thread Eric Covener
On Tue, Jan 2, 2018 at 6:45 AM, Simon Walter wrote: > Yes, thanks for looking at it, Eric. It is correct after I flatten it: > > output: > _ASCII_String0_!__ASCII_String4_!ASCII_String1_!_ASCII_String2_!_ASCII_String3_! > > but not when reading the bucket with apr_bucket_read(Index, &TestBuffer, >

Re: [users@httpd] apr_bucket_split data remains

2018-01-02 Thread Simon Walter
Yes, thanks for looking at it, Eric. It is correct after I flatten it: output: _ASCII_String0_!__ASCII_String4_!ASCII_String1_!_ASCII_String2_!_ASCII_String3_! but not when reading the bucket with apr_bucket_read(Index, &TestBuffer, &Length, APR_BLOCK_READ): Marker: 1 CurrBucket: _ASCII_String1_

Re: [users@httpd] apr_bucket_split data remains

2018-01-01 Thread Eric Covener
> I see such code as the example you gave in various places. However, this > bit of code (attached) shows me that I cannot simply printf the data. > Again, I am probably doing something wrong. > The output looks right to me but maybe I am misunderstanding the intent of the example. output: _ASCI

Re: [users@httpd] apr_bucket_split data remains

2018-01-01 Thread Simon Walter
On 01/01/2018 10:44 PM, Eric Covener wrote: > On Mon, Jan 1, 2018 at 8:37 AM, Simon Walter wrote: >> I am interested in how apr_bucket_split(e, point) works. >> >> It seems that after splitting e, it still contains everything after >> point. Only when flattened is this data "removed" from e. >> >>

Re: [users@httpd] apr_bucket_split data remains

2018-01-01 Thread Eric Covener
On Mon, Jan 1, 2018 at 8:37 AM, Simon Walter wrote: > I am interested in how apr_bucket_split(e, point) works. > > It seems that after splitting e, it still contains everything after > point. Only when flattened is this data "removed" from e. > > If that is correct, then is it also correct to assu

[users@httpd] apr_bucket_split data remains

2018-01-01 Thread Simon Walter
I am interested in how apr_bucket_split(e, point) works. It seems that after splitting e, it still contains everything after point. Only when flattened is this data "removed" from e. If that is correct, then is it also correct to assume that I would need to use apr_bucket_read with snprintf and m