Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the HTTP-BrowserDetect CPAN distribution.

Report information
The Basics
Id: 61437
Status: resolved
Worked: 20 min
Priority: 0/
Queue: HTTP-BrowserDetect

People
Owner: Nobody in particular
Requestors: jesse.thompson [...] doit.wisc.edu
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.18
Fixed in: 1.18

Attachments


Subject: doesn't detect palm pre
Mozilla/5.0 (webOS/1.0; U; en-US ) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/1.0 Safari/525.27.1 Pre/1.0 --- HTTP-BrowserDetect-1.18/lib/HTTP/BrowserDetect.pm 2010-09-06 19:18:05.000000000 -0500 +++ HTTP-BrowserDetect-1.18.new/lib/HTTP/BrowserDetect.pm 2010-09-17 15:54:56.934631984 -0500 @@ -37,7 +37,7 @@ palm audrey iopener wap blackberry iphone ipod ipad ps3 - psp kindle + psp kindle webos ); # Browsers @@ -451,6 +451,7 @@ $tests->{BLACKBERRY} = ( index( $ua, "blackberry" ) != -1 ); $tests->{IPHONE} = ( index( $ua, "iphone" ) != -1 ); + $tests->{WEBOS} = ( index( $ua, "webos" ) != -1 ); $tests->{IPOD} = ( index( $ua, "ipod" ) != -1 ); $tests->{IPAD} = ( index( $ua, "ipad" ) != -1 ); $tests->{KINDLE} = ( index( $ua, "kindle" ) != -1 ); @@ -992,7 +993,7 @@ my ( $self, $check ) = _self_or_default( @_ ); my @devices = qw( - blackberry iphone ipod ipad ps3 psp + blackberry iphone ipod ipad ps3 psp webos ); foreach my $device ( @devices ) { @@ -1013,6 +1014,7 @@ ipad => 'iPad', psp => 'Sony PlayStation Portable', ps3 => 'Sony PlayStation 3', + webos => 'webOS', ); my $device = $self->device; @@ -1164,7 +1166,7 @@ =head2 device() Returns the method name of the actual hardware, if it can be detected. -Currently returns one of: blackberry, iphone, ipod or ipad Returns UNDEF if +Currently returns one of: blackberry, webos, iphone, ipod or ipad Returns UNDEF if no hardware can be detected =head2 device_name() @@ -1408,6 +1410,8 @@ =head3 palm +=head3 webos + =head3 wap =head3 psp Only in HTTP-BrowserDetect-1.18.new/: pm_to_blib diff -ur HTTP-BrowserDetect-1.18/t/useragents.yaml HTTP-BrowserDetect-1.18.new/t/useragents.yaml --- HTTP-BrowserDetect-1.18/t/useragents.yaml 2010-09-06 19:18:05.000000000 -0500 +++ HTTP-BrowserDetect-1.18.new/t/useragents.yaml 2010-09-17 15:57:11.366631655 -0500 @@ -2148,4 +2148,15 @@ public_version: 4.0 public_major: 4 public_minor: 0 +--- +useragent: 'Mozilla/5.0 (webOS/1.0; U; en-US) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/1.0 Safari/525.27.1 Pre/1.0' +language: EN +country: US +match: + - safari + - mobile + - webos +engine_string: KHTML +device: webos +device_name: webOS
From: jesse.thompson [...] doit.wisc.edu
updated user agent string Mozilla/5.0 (webOS/1.4.5; U; en-US) AppleWebKit/532.2 (KHTML, like Gecko) Version/1.0 Safari/532.2 Pre/1.0
On Fri Sep 17 17:07:25 2010, zjt wrote: Show quoted text
> updated user agent string > > Mozilla/5.0 (webOS/1.4.5; U; en-US) AppleWebKit/532.2 (KHTML, like > Gecko) Version/1.0 Safari/532.2 Pre/1.0
Thanks for this. I'm actually have some trouble applying the patch. Could you just post your entire BrowserDetect.pm file? I can just diff it from there. Thanks again! Olaf
From: jesse.thompson [...] doit.wisc.edu
On Sat Sep 18 23:51:05 2010, OALDERS wrote: Show quoted text
> On Fri Sep 17 17:07:25 2010, zjt wrote:
> > updated user agent string > > > > Mozilla/5.0 (webOS/1.4.5; U; en-US) AppleWebKit/532.2 (KHTML, like > > Gecko) Version/1.0 Safari/532.2 Pre/1.0
> > Thanks for this. I'm actually have some trouble applying the patch. > Could you just post your entire BrowserDetect.pm file? I can just diff > it from there. > > Thanks again! > > Olaf
Attached. I changed multiple files. Jesse
Subject: HTTP-BrowserDetect-1.18.new.tar.bz2

Message body not shown because it is not plain text.

On Mon Sep 20 10:36:24 2010, zjt wrote: Show quoted text
> On Sat Sep 18 23:51:05 2010, OALDERS wrote:
> > On Fri Sep 17 17:07:25 2010, zjt wrote:
> > > updated user agent string > > > > > > Mozilla/5.0 (webOS/1.4.5; U; en-US) AppleWebKit/532.2 (KHTML, like > > > Gecko) Version/1.0 Safari/532.2 Pre/1.0
> > > > Thanks for this. I'm actually have some trouble applying the patch. > > Could you just post your entire BrowserDetect.pm file? I can just diff > > it from there. > > > > Thanks again! > > > > Olaf
> > Attached. I changed multiple files. > > Jesse >
Thanks for this. Your changes have been added to 1.19, which is currently on its way to the CPAN. Olaf