Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Black berry #19

Merged
merged 2 commits into from
Oct 25, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/HTTP/BrowserDetect.pm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ push @ALL_TESTS, qw(
aol6 neoplanet neoplanet2
avantgo emacs mozilla
r1 elinks netfront
mobile_safari
mobile_safari blackberry
);

# Engines
Expand Down Expand Up @@ -761,6 +761,7 @@ sub browser_string {
$browser_string = 'NetFront' if $self->netfront;
$browser_string = 'Mobile Safari' if $self->mobile_safari;
$browser_string = 'ELinks' if $self->elinks;
$browser_string = 'BlackBerry' if $self->blackberry;
}
return $browser_string;
}
Expand Down Expand Up @@ -1452,7 +1453,8 @@ Firebird).
Returns undef on failure. Otherwise returns one of the following:

Netscape, Firefox, Safari, Chrome, MSIE, WebTV, AOL Browser, Opera, Mosaic,
Lynx, Links, ELinks, RealPlayer, IceWeasel, curl, puf, NetFront, Mobile Safari
Lynx, Links, ELinks, RealPlayer, IceWeasel, curl, puf, NetFront, Mobile Safari,
BlackBerry

=head2 gecko_version()

Expand Down
34 changes: 34 additions & 0 deletions t/useragents.json
Original file line number Diff line number Diff line change
Expand Up @@ -2812,6 +2812,40 @@
"public_minor" : "0",
"public_version" : "8.0",
"version" : "8.0"
},
"Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; fr) AppleWebKit/534.1+ (KHTML, like Gecko) Version/6.0.0.246 Mobile Safari/534.1+" : {
"browser_string" : "BlackBerry",
"match" : [
"safari",
"mobile",
"mobile_safari",
"blackberry",
"device"
],
"no_match" : [
"robot"
],
"public_version" : "6.0",
"device_name" : "BlackBerry",
"language" : "FR",
"engine_string" : "KHTML"
},
"BlackBerry8520/4.6.1.272 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/118" : {
"browser_string" : "BlackBerry",
"match" : [
"mobile",
"blackberry",
"device"
],
"minor" : ".6",
"no_match" : [
"robot"
],
"public_major" : "4",
"public_minor" : ".6",
"public_version" : "4.6",
"version" : "4.6",
"device_name" : "BlackBerry"
}
}