Skip Menu |

This queue is for tickets about the WWW-RobotRules CPAN distribution.

Report information
The Basics
Id: 116806
Status: new
Priority: 0/
Queue: WWW-RobotRules

People
Owner: Nobody in particular
Requestors: vgolubev [...] tcinet.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Doesn't work with slashes (/) in User agent names
Date: Tue, 09 Aug 2016 17:52:04 +0300
To: bug-WWW-RobotRules [...] rt.cpan.org
From: Vitaly Golubev <vgolubev [...] tcinet.ru>
Hello version: 6.02 Doesn't work with slashes (/) in User agent names - it looks that the problem is in is_me function. According existing comments arguments should be swapped for index function. It started to work after this correction. sub is_me { my($self, $ua_line) = @_; my $me = $self->agent; # See whether my short-name is a substring of the # "User-Agent: ..." line that we were passed: #wrong order if(index(lc($me), lc($ua_line)) >= 0) { if(index(lc($ua_line), lc($me)) >= 0) { return 1; } else { return ''; } }