httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: Apache-Test
Date Thu, 13 Jan 2005 15:28:06 GMT


Stas Bekman wrote:
> Geoffrey Young wrote:
> 
>>> In which case we need to remove the custom patterns we have added so
>>> far?
>>
>>
>>
>> hmm, did we actually add any, or just make the regex a bit more loose?  I
>> can't recall.
> 
> 
> can you see how Apache-PREFORK-AdvancedExtranetServer/2.0.52 matches 1?
> 
> That's because our code is completely broken, since this is bogus:
> 
> # Apache-AdvancedExtranetServer/1.3.29 (Mandrake Linux/1mdk)
> ($self->{rev}) ||= $self->{version} =~ m|^Apache.*?/(\d)\.|;
> 
> # IBM_HTTP_SERVER/1.3.19  Apache/1.3.20 (Unix)
> ($self->{rev}) ||= $self->{version} =~ m|^.*?Apache.*?/(\d)\.|;
> 
> it always matches 1. It should be:
> 
> # Apache-AdvancedExtranetServer/1.3.29 (Mandrake Linux/1mdk)
> ($self->{rev}) ||= ($self->{version} =~ m|^Apache.*?/(\d)\.|);
> 
> # IBM_HTTP_SERVER/1.3.19  Apache/1.3.20 (Unix)
> ($self->{rev}) ||= ($self->{version} =~ m|^.*?Apache.*?/(\d)\.|);
> 
> we have noticed that bug, since those patterns were written when testing
> 1.3 and of course it has matched 1 :)

yeah, I wish I had noticed before - it's a major gripe of mine that ||=
wrecks that match idiom.

> Let's try first with a relaxed /x.y.zz", before we add yet another env var.

ok.

--Geoff

Mime
View raw message