Re: Apache2::Filter Intermittently Missing Injected String
Adam Prime <[email protected]>
| Newsgroups | gmane.comp.apache.mod-perl |
|---|---|
| Message-ID | <[email protected]> |
I wrote a module based on a talk Geoff Young gave a bazillion years ago to abstract this problem away (sort of). You can check it out here: http://search.cpan.org/~aprime/Apache2-Filter-TagAware-0.02/lib/Apache2/Filter/TagAware.pm Adam On 3/31/2011 12:30 AM, Chris Datfung wrote: > On Wed, Mar 30, 2011 at 12:36 PM, Hendrik Schumacher <[email protected] > <mailto:[email protected]>> wrote: > > Am Mi, 30.03.2011, 12:17 schrieb Chris Datfung: > > I had a similar problem with a http proxy that injected a string > into the > HTML body. If the response is passed to the filter in multiple parts > there > is a certain probability that the response is split on the string > position > you are looking for (for example part 2 ends with "</bo" and part 3 > starts > with "dy>"). I had to buffer the last bytes of each response part > and take > them into account > > > Hi Hendrik, > > That is exactly the problem. How did you buffer the last bytes of each > response. Don't you just set the BUFF_LEN and thats the number of > characters you get? > > Chris >