Skip Menu |
 

This queue is for tickets about the HTML-ParseBrowser CPAN distribution.

Report information
The Basics
Id: 49718
Status: resolved
Priority: 0/
Queue: HTML-ParseBrowser

People
Owner: Nobody in particular
Requestors: peter [...] makholm.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1_0
Fixed in: 1.01



Subject: Debian version of Iceweasel identified as Mozilla/5.0
Download (untitled) / with headers
text/plain 688b
The Debian version of IceWeasel (Firefox fork) uses the following UserAgent String: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090730 Iceweasel/3.5.1 (Debian-3.5.1-1) Both the official version and CHORNY's version 1.1 parses this as Mozilla/5.0. This is due to everything between parentheses is grabbed as 'detail' with a greedy regexp. Changing this piece of code at the top of the Parse subroutine fixes the problem: if ($useragent =~ s/\((.*)\)//) { $browser->{detail} = $1; } to if ($useragent =~ s/\((.*?)\)//) { $browser->{detail} = $1; } Mapping Iceweasel to Mozilla at the end of the parsing might be useful too.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.