You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by John ORourke <jo...@o-rourke.org> on 2008/02/21 10:44:26 UTC

flood reg ex matching problems

Hi folks,

I grabbed flood from svn and built it according to the instructions at 
http://httpd.apache.org/test/flood/

I've been getting 'Regular expression match failed' most of the time, 
and even tried running one of the examples:

----------------------
root@bella:/home/staff/john/flood# /usr/local/flood/bin/flood 
examples/round-robin-dynamic.xml
Regular expression match failed (<a href="([^"]*)">FAQ</a>)
postprocessing failed (http://httpd.apache.org/).
Error running farmer 'Joe': Internal error.
----------------------

I even tried a ridiculously simple one and it still failed:
    <url responsetemplate="(DOCTYPE)" 
responsename="foo">http://httpd.apache.org</url>

I've even tried updating my pcre version (v3 was installed on this 
Ubuntu system) to no avail - it looks as though theres a version 
compiled in statically anyway (I'm using --disable-shared as per the 
doc, not sure if it has any effect on pcre).

I've had some simple regex's working - eg. if I try 
responsetemplate="href=&quot;([^&quot;]+)&quot;" it sometimes works.

Any ideas?

thanks in advance,
John O'Rourke


Re: flood reg ex matching problems

Posted by John ORourke <jo...@o-rourke.org>.
Guy Ferraiolo wrote:
> My experience is similar.  It seems that some simple matching works but
> not in all cases.  Any advice from anyone?
>   
I figured it out in the end!  Flood isn't retrieving the full response 
by default for some reason, so can't match what's in the body.  After 
poking around in the code I found there's a different response handler:

Just add        <recv_resp>generic_fullresp_recv_resp</recv_resp>    at 
the end of your <profile> entry and the reg ex's work perfectly.

Re your other email, I'm seriously considering putting some time (or one 
my minions time more likely!) into developing flood, so I'll keep the 
list posted on that.

cheers
John


Re: flood reg ex matching problems

Posted by Guy Ferraiolo <gu...@cnet.com>.
My experience is similar.  It seems that some simple matching works but
not in all cases.  Any advice from anyone?

Guy

On Thu, 2008-02-21 at 09:44 +0000, John ORourke wrote:
> Hi folks,
> 
> I grabbed flood from svn and built it according to the instructions at 
> http://httpd.apache.org/test/flood/
> 
> I've been getting 'Regular expression match failed' most of the time, 
> and even tried running one of the examples:
> 
> ----------------------
> root@bella:/home/staff/john/flood# /usr/local/flood/bin/flood 
> examples/round-robin-dynamic.xml
> Regular expression match failed (<a href="([^"]*)">FAQ</a>)
> postprocessing failed (http://httpd.apache.org/).
> Error running farmer 'Joe': Internal error.
> ----------------------
> 
> I even tried a ridiculously simple one and it still failed:
>     <url responsetemplate="(DOCTYPE)" 
> responsename="foo">http://httpd.apache.org</url>
> 
> I've even tried updating my pcre version (v3 was installed on this 
> Ubuntu system) to no avail - it looks as though theres a version 
> compiled in statically anyway (I'm using --disable-shared as per the 
> doc, not sure if it has any effect on pcre).
> 
> I've had some simple regex's working - eg. if I try 
> responsetemplate="href=&quot;([^&quot;]+)&quot;" it sometimes works.
> 
> Any ideas?
> 
> thanks in advance,
> John O'Rourke
> 
-- 
Guy Ferraiolo                                   mailto:guyf@CNET.com
Performance Measurement & Analysis              http://CNET.com
CNET                                            tel: 1.908.541.3739
1200 Route 22 East                              fax: 1.908.575.7474
Bridgewater, NJ 08807                           cel: 1.732.618.0250