On Fri, 27 Aug 2010 13:24:51 +0000 (UTC)
Abhinav Upadhyay <[email protected]> wrote:
> I would like to apologize for posting a message related to
> modules in the core apache development group, but I was
> unable to post a message in the Apache Modules development
> list.
Did you subscribe to it?
> My problem
You haven't told us what problem you're seeing.
> /* loop through the bucket brigade and read each
> * bucekt to scan for the
> *string place
> */
I thought the book went to some length to tell you how not to do that ...
> /* check if the buffer contains place*/
> tag = ap_strcasestr(buf, place);
1. Dangerous because buf isn't null-terminated.
2. Will miss a match if the string is split over multiple buckets.
Take a look at mod_substitute or mod_line_edit.
--
Nick Kew