Re: splitting a string...

2007-01-02 Thread Joachim Zobel
Am Dienstag, den 02.01.2007, 13:29 -0800 schrieb Drew Bertola: > > for ( e = APR_BRIGADE_FIRST(bb) ; > > e != APR_BRIGADE_SENTINEL(bb) ; > > e = APR_BUCKET_NEXT(e) ) { > - create context if it doesn't already exist. > - loop through buckets (from FIRST to SENTINEL) in brigade pa

Re: splitting a string...

2007-01-02 Thread Joe Lewis
Drew Bertola wrote: Again, makes me wish for a null output filter example. Try this link - it was written about 6 years ago, but still applies. It's a Ryan Bloom article (he was one of the APR developers). The link : http://www.serverwatch.com/news/article.php/1127731 My understanding i

Re: splitting a string...

2007-01-02 Thread Drew Bertola
Joachim Zobel wrote: > Am Dienstag, den 02.01.2007, 01:14 -0800 schrieb Drew Bertola: > >> line 91 looks like this: >> >> apr_bucket_read(e, &str, &len, APR_NONBLOCK_READ); >> >> Also, it only happens if I use >> >> APR_BRIGADE_INSERT_TAIL(ctx->bb, e); >> > > Ah, understood

Re: splitting a string...

2007-01-02 Thread Joachim Zobel
Am Dienstag, den 02.01.2007, 13:15 -0800 schrieb Drew Bertola: > I made a mental note to revisit apr_strmatch and friends. I have to > find an example of how to allocate the pool used in the precompile. I doubt that this is worth the effort, but a child init handler, that initialises a static wou

Re: splitting a string...

2007-01-02 Thread Drew Bertola
Joe Lewis wrote: > Make SURE you are not using things like strcasestr - it is not > platform independent (requires GNU source definitions). Besides, you > may want to change that to a series of apr_strmatch_precompile and > apr_strmatch commands to do the searching - those take an additional > par

Re: splitting a string...

2007-01-02 Thread Joachim Zobel
Am Dienstag, den 02.01.2007, 01:14 -0800 schrieb Drew Bertola: > line 91 looks like this: > > apr_bucket_read(e, &str, &len, APR_NONBLOCK_READ); > > Also, it only happens if I use > > APR_BRIGADE_INSERT_TAIL(ctx->bb, e); Ah, understood. You don't mention this, but you probably

Re: splitting a string...

2007-01-02 Thread Joe Lewis
Drew Bertola wrote: while ( i < len ) { ap_fputc(f->next, ctx->bb, str[i++]); } This is a performance hog. With this, I don't have the segfaults anymore. html is ok too. -- Drew I would expect it to be a performance h

Re: splitting a string...

2007-01-02 Thread Drew Bertola
Joachim Zobel wrote: > Am Montag, den 01.01.2007, 06:18 -0800 schrieb Drew Bertola: > >> This generates segfaults when processing php and doesn't help with my >> problem. Is the problem due to filter order? >> > > To find out more about the segf's do [snip - thanks] I'm confused about