Codebase list libhttp-browserdetect-perl / 0f76f01
[svn-upgrade] Integrating new upstream version, libhttp-browserdetect-perl (1.16) IƱigo Tejedor Arrondo 13 years ago
13 changed file(s) with 1587 addition(s) and 125 deletion(s). Raw diff Collapse all Expand all
2222 'Olaf Alders <olaf@wundercounter.com> (current maintainer)'
2323 ],
2424 'dist_name' => 'HTTP-BrowserDetect',
25 'dist_version' => '1.13',
25 'dist_version' => '1.16',
2626 'license' => 'perl',
2727 'module_name' => 'HTTP::BrowserDetect',
2828 'recommends' => {},
00 Revision history for Perl extension HTTP::BrowserDetect.
1
2 1.16 2010-08-19
3 - Added support for the < 3.0 Safari public versions (Jon Jensen)
4 - Added new UserAgents to useragents.yaml (Jon Jensen)
5
6 1.15 2010-08-18
7 - Re-releasing after some folders unintentionally included in build
8
9 1.14 2010-08-18
10 - Fixed uninitialized value warnings for Safari (Heiko Weber) RT #60440
111
212 1.13 2010-08-10
313 - Firefox Mobile (Fennec) is now detected as mobile RT #60186 (Jacob Rask)
818 - Added googlemobile (Luke Saunders: ec28d49d7218b43788b9)
919 - SymbOS and Opera Mobi added to mobile detection RT #59817 (Jacob Rask)
1020 - Distribution is now managed with Dist::Zilla
11
21
1222 1.11 2010-06-03
1323 - Added ps3 and psp (commit 85a619c9a977c0a8e403) (Alexey Surikov)
1424
00
11 This is the Perl distribution HTTP-BrowserDetect.
22
3 Installing HTTP-BrowserDetect is straightforward.
3 ## Installation
44
5 ## Installation with cpanm
6
7 If you have cpanm, you only need one line:
8
9 % cpanm HTTP::BrowserDetect
10
11 If you are installing into a system-wide directory, you may need to pass the
12 "-S" flag to cpanm, which uses sudo to install the module:
13
14 % cpanm -S HTTP::BrowserDetect
15
16 ## Installing with the CPAN shell
17
18 Alternatively, if your CPAN shell is set up, you should just be able to do:
5 HTTP-BrowserDetect installation is straightforward.
6 If your CPAN shell is set up, you should just be able to do
197
208 % cpan HTTP::BrowserDetect
219
22 ## Manual installation
23
24 As a last resort, you can manually install it. Download the tarball, untar it,
25 then build it:
10 Download it, unpack it, then build it as per the usual:
2611
2712 % perl Makefile.PL
2813 % make && make test
3116
3217 % make install
3318
34 If you are installing into a system-wide directory, you may need to run:
35
36 % sudo make install
37
3819 ## Documentation
3920
40 HTTP-BrowserDetect documentation is available as POD.
41 You can run perldoc from a shell to read the documentation:
21 HTTP-BrowserDetect documentation is available as in POD.
22 So you can do:
4223
4324 % perldoc HTTP::BrowserDetect
25
26 to read the documentation with your favorite pager.
1010 lib/HTTP/BrowserDetect.pm
1111 t/01-detect.t
1212 t/author-critic.t
13 t/create_config.pl
1314 t/release-pod-coverage.t
1415 t/release-pod-syntax.t
1516 t/useragents.yaml
1212 ExtUtils::MakeMaker: 6.31
1313 Module::Build: 0.3601
1414 dynamic_config: 0
15 generated_by: 'Dist::Zilla version 4.101900, CPAN::Meta::Converter version 2.101670'
15 generated_by: 'Dist::Zilla version 4.102221, CPAN::Meta::Converter version 2.102160'
1616 license: perl
1717 meta-spec:
1818 url: http://module-build.sourceforge.net/META-spec-v1.4.html
2424 resources:
2525 bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=HTTP-BrowserDetect
2626 repository: http://github.com/oalders/http-browserdetect
27 version: 1.13
27 version: 1.16
3030 'Exporter' => '0',
3131 'vars' => '0'
3232 },
33 'VERSION' => '1.13',
33 'VERSION' => '1.16',
3434 'test' => {
3535 'TESTS' => 't/*.t'
3636 }
22 an HTTP user agent string
33
44 VERSION
5 version 1.13
5 version 1.16
66
77 SYNOPSIS
88 use HTTP::BrowserDetect;
209209 Returns one of the following strings, or undef. This method exists
210210 solely for compatibility with the HTTP::Headers::UserAgent module.
211211
212 Win95, Win98, WinNT, Win2K, WinXP, Win2K3, WinVista, Win7, Mac, Mac OS X,
212 Win95, Win98, WinNT, Win2K, WinXP, Win2k3, WinVista, Win7, Mac, Mac OS X,
213213 Win3x, OS2, Unix, Linux, Playstation 3 GameOS, Playstation Portable GameOS
214214
215215 Detecting Browser Vendor
239239 curl
240240 realplayer
241241 netfront
242 Netscape 6, even though its called six, in the userAgent string has
242 Netscape 6, even though its called six, in the User-Agent string has
243243 version number 5. The nav6 and nav6up methods correctly handle this
244 quirk. The firefox text correctly detects the older-named versions of
245 the browser (Phoenix, Firebird)
244 quirk. The Firefox test correctly detects the older-named versions of
245 the browser (Phoenix, Firebird).
246246
247247 browser_string()
248248 Returns undef on failure. Otherwise returns one of the following:
249249
250 Firefox, Safari, Chrome, MSIE, etc
251
252 To see a complete list of possible browser strings, check the
253 browser_string() method in the source code.
250 Netscape, Firefox, Safari, Chrome, MSIE, WebTV, AOL Browser, Opera,
251 Mosaic, Lynx, RealPlayer, IceWeasel, curl, puf, NetFront
254252
255253 gecko_version()
256 If a Gecko rendering engine is used (as in Mozilla or Firebird), returns
254 If a Gecko rendering engine is used (as in Mozilla or Firefox), returns
257255 the version of the renderer (e.g. 1.3a, 1.7, 1.8) This might be more
258256 useful than the particular browser name or version when correcting for
259257 quirks in different versions of this rendering engine. If no Gecko
349347
350348 Jacob Rask
351349
350 Heiko Weber
351
352 Jon Jensen
353
352354 TO DO
353355 The _engine() method currently only handles Gecko. It needs to be
354356 expanded to handle other rendering engines.
355357
356358 POD coverage is also not 100%.
357359
358 If you're able to help out with anything on the TO DO list, please do. A
359 great deal of the latest improvements have come from patches via RT and
360 GitHub pull requests. If you're able to submit changes via GitHub, I'm
361 generally able to get them into a new release fairly quickly.
362
363360 SEE ALSO
364361 "The Ultimate JavaScript Client Sniffer, Version 3.0",
365 http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html.
366
367 "Browser ID (User-Agent) Strings"
362 http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
363
364 "Browser ID (User-Agent) Strings",
368365 http://www.zytrax.com/tech/web/browser_ids.htm
366
367 Safari "Historical User Agent strings",
368 http://developer.apple.com/internet/safari/uamatrix.html (now gone,
369 retrieved 2007-06-20)
370
371 "Safari Agent Strings",
372 http://homepage.mac.com/jprince/designSandbox/web/safari-agents/
369373
370374 perl(1), HTTP::Headers, HTTP::Headers::UserAgent.
371375
400404 The biggest limitation at this point is the test suite, which really
401405 needs to have many more UserAgent strings to test against.
402406
407 CONTRIBUTING
403408 Patches are certainly welcome, with many thanks for the excellent
404409 contributions which have already been received. The preferred method of
405410 patching would be to fork the GitHub repo and then send me a pull
406411 requests, but plain old patch files are also welcome.
407412
413 If you're able to add test cases, this will speed up the time to release
414 your changes. Just edit t/useragents.yaml so that the test coverage
415 includes any changes you have made. Please contact me if you have any
416 questions.
417
408418 AUTHOR
409419 Olaf Alders <olaf@wundercounter.com> (current maintainer)
410420
0 name = HTTP-BrowserDetect
0 name = HTTP-BrowserDetect
11 author = Olaf Alders <olaf@wundercounter.com> (current maintainer)
22 license = Perl_5
3 copyright_holder = Lee Semel
3 copyright_holder = Lee Semel
44 copyright_year = 2010
5 version = 1.13
5 version = 1.16
66 main_module = lib/HTTP/BrowserDetect.pm
77
88 [MetaResources]
1818 [ModuleBuild]
1919 [PodWeaver]
2020
21 [UploadToCPAN]āŽ
00 use strict;
11 package HTTP::BrowserDetect;
22 BEGIN {
3 $HTTP::BrowserDetect::VERSION = '1.13';
3 $HTTP::BrowserDetect::VERSION = '1.16';
44 }
55
66 use vars qw(@ISA @EXPORT @EXPORT_OK @ALL_TESTS);
7474 # Properties
7575 push @ALL_TESTS, 'mobile';
7676
77
78 # Safari build -> version map for versions prior to 3.0
79 # (since then, version appears in the user-agent string)
80
81 my %safari_build_to_version = qw(
82 48 0.8
83 51 0.8.1
84 60 0.8.2
85 73 0.9
86 74 1.0b2v74
87 85 1.0
88 85.7 1.0.2
89 85.8 1.0.3
90 100 1.1
91 100.1 1.1.1
92 125 1.2
93 125.1 1.2.1
94 125.7 1.2.2
95 125.9 1.2.3
96 125.11 1.2.4
97 312 1.3
98 312.3 1.3.1
99 312.5 1.3.2
100 412 2.0
101 412.5 2.0.1
102 416.12 2.0.2
103 417.8 2.0.3
104 419.3 2.0.4
105 );
106
107
77108 #######################################################################################################
78109 # BROWSER OBJECT
79110
147178 ( [^\s]* ) # Beta version string is up to next space
148179 }x
149180 );
150
181
151182
152183 # Firefox version
153184 if ($ua =~ m{
187218 $beta = $3;
188219
189220 }
190
221
191222 # Opera needs to be dealt with specifically
192223 # http://dev.opera.com/articles/view/opera-ua-string-changes/
193224 # Opera/9.80 (S60; SymbOS; Opera Mobi/320; U; sv) Presto/2.4.15 Version/10.00
194
225
195226 if ( $ua =~ m{\AOpera.*\sVersion/(\d*)\.(\d*)\z}i) {
196227 $major = $1;
197228 $minor = $2;
222253 ( [^.]* ) # Minor version number is digits after first dot
223254 }x
224255 );
225
226 #print "major=$major minor=$minor beta=$beta\n";
227256 }
228257
229258 # Safari Version
230259 elsif ( $tests->{SAFARI} ) {
231
232
233 my ( $safari_build, $safari_minor );
234 ( $safari_build, $safari_minor ) = (
260 my ( $safari_build, $safari_minor ) = (
235261 $ua =~ m{
236 safari
237 \/
238 ( [^.]* ) # Major version number is everything before first dot
239 (?: # The first dot
240 ( \d* ))? # Minor version number is digits after first dot
262 safari/
263 ( \d+ ) # Major version number
264 ( \. \d+ )? # Minor version number is dot and following digits
241265 }x
242266 );
243267
244 # in some obscure cases, extra characters are captured by the regex
245 # like: Mozilla/5.0 (SymbianOS/9.1; U; en-us) AppleWebKit/413 (KHTML, like Gecko) Safari/413 UP.Link/6.3.1.15.0
246 $safari_build =~ s{ [^\d] }{}gxms;
247
248 $major = int( $safari_build / 100 );
249 $minor = int( $safari_build % 100 ) / 100;
250 $beta = $safari_minor;
251
268 if ( !$safari_build && $ua =~ m{applewebkit\/([\d\.]{1,})}xi ) {
269 # ignore digits after 2nd dot
270 ( $safari_build, $safari_minor ) = split /\./, $1;
271 }
272
273 if ( $safari_build ) {
274 $major = int( $safari_build / 100 );
275 $minor = int( $safari_build % 100 ) / 100;
276 $beta = $safari_minor;
277 }
252278 }
253279
254280 # Gecko-powered Netscape (i.e. Mozilla) versions
260286 && index( $ua, "compatible" ) == -1
261287 && index( $ua, "opera" ) == -1
262288 && index( $ua, "webtv" ) == -1
263 && index( $ua, "hotjava" ) == -1
289 && index( $ua, "hotjava" ) == -1
264290 && index( $ua, "playstation 3" ) == -1
265291 && index( $ua, "playstation portable" ) == -1 );
266292
798824 }
799825
800826 sub public_beta {
801
802 my ( $self, $check ) = _self_or_default( @_ );
803 return $self->beta( $check );
804
827 my ( $self, $check ) = _self_or_default( @_ );
828 my ( $major, $minor, $beta ) = $self->_public;
829
830 return $beta;
805831 }
806832
807833 sub _public {
808834 my ( $self, $check ) = _self_or_default( @_ );
809835
810 my $ua = $self->user_agent;
811
812 # this is the Public version of Safari. See RT #48727
813 if ( $self->safari && $ua =~ m{
836 # Return Public version of Safari. See RT #48727.
837 if ($self->safari) {
838 my $ua = lc $self->user_agent;
839
840 # Safari starting with version 3.0 provides its own public version
841 if ( $ua =~ m{
814842 version/
815 ( [^.]* ) # Major version number is everything before first dot
816 \. # The first dot
817 ( [^.]* ) # Minor version number is digits after first dot
843 ( \d+ ) # Major version number is everything before first dot
844 ( \. \d+ )? # Minor version number is first dot and following digits
818845 }x
819 )
820 {
821 return ( $1, $2 );
822 }
823
824 return ( $self->major, $self>minor );
825
846 )
847 {
848 return ($1, $2, undef);
849 }
850
851 # Safari before version 3.0 had only build numbers;
852 # use a lookup table provided by Apple to convert to version numbers
853 if ($ua =~ m{ safari/ ( \d+ (?: \.\d+ )* ) }x) {
854 my $build = $1;
855 my $version = $safari_build_to_version{$build};
856 unless ($version) {
857 # if exact build -> version mapping doesn't exist, find next lower build
858 for my $maybe_build (sort { $b <=> $a } keys %safari_build_to_version) {
859 $version = $safari_build_to_version{$maybe_build}, last
860 if $build >= $maybe_build;
861 }
862 }
863 my ($major, $minor) = split /\./, $version;
864 my $beta;
865 $minor =~ s/(\D.*)// and $beta = $1;
866 $minor = 0 + ('.' . $minor);
867 return ( $major, $minor, ($beta ? 1 : undef) );
868 }
869 }
870
871 return ( $self->major, $self->minor, $self->beta($check) );
826872 }
827873
828874
830876 sub engine_string {
831877
832878 my ( $self, $check ) = _self_or_default( @_ );
879
880 if ( $self->user_agent =~ m{\bKHTML\b} ) {
881 return 'KHTML';
882 }
833883
834884 if ( $self->gecko ) {
835885 return 'Gecko';
836 }
837
838 if ( $self->user_agent =~ m{KHTML, like Gecko} ) {
839 return 'KHTML';
840886 }
841887
842888 if ( $self->ie ) {
10191065
10201066 =head1 VERSION
10211067
1022 version 1.13
1068 version 1.16
10231069
10241070 =head1 SYNOPSIS
10251071
12501296 Returns one of the following strings, or undef. This method exists solely for
12511297 compatibility with the L<HTTP::Headers::UserAgent> module.
12521298
1253 Win95, Win98, WinNT, Win2K, WinXP, Win2K3, WinVista, Win7, Mac, Mac OS X,
1299 Win95, Win98, WinNT, Win2K, WinXP, Win2k3, WinVista, Win7, Mac, Mac OS X,
12541300 Win3x, OS2, Unix, Linux, Playstation 3 GameOS, Playstation Portable GameOS
12551301
12561302 =head1 Detecting Browser Vendor
13031349
13041350 =head3 netfront
13051351
1306 Netscape 6, even though its called six, in the userAgent string has version
1307 number 5. The nav6 and nav6up methods correctly handle this quirk. The firefox
1308 text correctly detects the older-named versions of the browser (Phoenix,
1309 Firebird)
1352 Netscape 6, even though its called six, in the User-Agent string has version
1353 number 5. The nav6 and nav6up methods correctly handle this quirk. The Firefox
1354 test correctly detects the older-named versions of the browser (Phoenix,
1355 Firebird).
13101356
13111357 =head2 browser_string()
13121358
13131359 Returns undef on failure. Otherwise returns one of the following:
13141360
1315 Firefox, Safari, Chrome, MSIE, etc
1316
1317 To see a complete list of possible browser strings, check the browser_string()
1318 method in the source code.
1361 Netscape, Firefox, Safari, Chrome, MSIE, WebTV, AOL Browser, Opera, Mosaic,
1362 Lynx, RealPlayer, IceWeasel, curl, puf, NetFront
13191363
13201364 =head2 gecko_version()
13211365
1322 If a Gecko rendering engine is used (as in Mozilla or Firebird), returns the
1366 If a Gecko rendering engine is used (as in Mozilla or Firefox), returns the
13231367 version of the renderer (e.g. 1.3a, 1.7, 1.8) This might be more useful than
13241368 the particular browser name or version when correcting for quirks in different
13251369 versions of this rendering engine. If no Gecko browser is being used, or the
14431487
14441488 Jacob Rask
14451489
1490 Heiko Weber
1491
1492 Jon Jensen
1493
14461494 =head1 TO DO
14471495
14481496 The _engine() method currently only handles Gecko. It needs to be expanded to
14501498
14511499 POD coverage is also not 100%.
14521500
1453 If you're able to help out with anything on the TO DO list, please do. A great
1454 deal of the latest improvements have come from patches via RT and GitHub pull
1455 requests. If you're able to submit changes via GitHub, I'm generally able to
1456 get them into a new release fairly quickly.
1457
14581501 =head1 SEE ALSO
14591502
1460 "The Ultimate JavaScript Client Sniffer, Version 3.0", B<http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html>.
1461
1462 "Browser ID (User-Agent) Strings" B<http://www.zytrax.com/tech/web/browser_ids.htm>
1503 "The Ultimate JavaScript Client Sniffer, Version 3.0", B<http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html>
1504
1505 "Browser ID (User-Agent) Strings", B<http://www.zytrax.com/tech/web/browser_ids.htm>
1506
1507 Safari "Historical User Agent strings", B<http://developer.apple.com/internet/safari/uamatrix.html> (now gone, retrieved 2007-06-20)
1508
1509 "Safari Agent Strings", B<http://homepage.mac.com/jprince/designSandbox/web/safari-agents/>
14631510
14641511 perl(1), L<HTTP::Headers>, L<HTTP::Headers::UserAgent>.
14651512
14991546
15001547 The biggest limitation at this point is the test suite, which really needs to
15011548 have many more UserAgent strings to test against.
1549
1550 =head1 CONTRIBUTING
15021551
15031552 Patches are certainly welcome, with many thanks for the excellent
15041553 contributions which have already been received. The preferred method of
15051554 patching would be to fork the GitHub repo and then send me a pull requests,
15061555 but plain old patch files are also welcome.
15071556
1557 If you're able to add test cases, this will speed up the time to release your
1558 changes. Just edit t/useragents.yaml so that the test coverage includes any
1559 changes you have made. Please contact me if you have any questions.
1560
15081561 =head1 AUTHOR
15091562
15101563 Olaf Alders <olaf@wundercounter.com> (current maintainer)
2424 }
2525 }
2626
27 foreach my $method (
28 'major', 'minor', 'engine_major', 'engine_minor',
29 'version', 'engine_version',
30 )
27 foreach my $method (qw(
28 public_version
29 public_major
30 public_minor
31 version
32 major
33 minor
34 engine_version
35 engine_major
36 engine_minor
37 ))
3138 {
32 if ( exists $test->{$method} && $test->{$method} ) {
39 if ( exists $test->{$method} and defined $test->{$method} and length $test->{$method} ) {
3340 cmp_ok( $detected->$method, '==', $test->{$method},
3441 "$method: $test->{$method}" );
3542 }
3643 }
3744
3845 foreach my $method ( 'language', 'device', 'device_name' ) {
39 if ( exists $test->{$method} && $test->{$method} ) {
46 if ( exists $test->{$method} and defined $test->{$method} and length $test->{$method} ) {
4047 cmp_ok( $detected->$method, 'eq', $test->{$method},
4148 "$method: $test->{$method}" );
4249 }
1515
1616 eval "use Test::Perl::Critic";
1717 plan skip_all => 'Test::Perl::Critic required to criticise code' if $@;
18 Test::Perl::Critic->import( -profile => "perlcritic.rc" ) if -e "perlcritic.rc";
1819 all_critic_ok();
0 #!/usr/bin/perl
1
2 use strict;
3 use warnings;
4
5 use Data::Dump qw( dump );
6 use Test::More qw( no_plan );
7 require_ok('HTTP::BrowserDetect');
8
9 my @tests = (
10 [
11 "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.5) Gecko/20031007 Firebird/0.7",
12 "0.7",
13 0,
14 0.7,
15 "Firefox",
16 "WinXP",
17 "1.5",
18 ["windows", "win32", "winnt", "winxp", "firefox", "gecko"],
19 ],
20 [
21 "Mozilla/1.1 (Windows 3.0; I)",
22 "1.1",
23 1,
24 "0.1",
25 "Netscape",
26 "Win3x",
27 undef,
28 ["netscape", "windows", "win3x", "win16"],
29 ],
30 [
31 "Mozilla/1.1 (Windows 3.1; I)",
32 "1.1",
33 1,
34 "0.1",
35 "Netscape",
36 "Win3x",
37 undef,
38 ["netscape", "windows", "win31", "win3x", "win16"],
39 ],
40 [
41 "Mozilla/2.0 (Win95; I)",
42 "2.0",
43 2,
44 0,
45 "Netscape",
46 "Win95",
47 undef,
48 ["netscape", "nav2", "windows", "win32", "win95"],
49 ],
50 [
51 "Mozilla/2.0 (compatible; MSIE 3.01; Windows 95)",
52 "3.01",
53 3,
54 .01,
55 "MSIE",
56 "Win95",
57 undef,
58 ["ie", "ie3", "windows", "win32", "win95"],
59 ],
60 [
61 "Mozilla/2.0 (compatible; MSIE 3.01; Windows NT)",
62 "3.01",
63 3,
64 .01,
65 "MSIE",
66 "WinNT",
67 undef,
68 ["ie", "ie3", "windows", "win32", "winnt"],
69 ],
70 [
71 "Mozilla/2.0 (compatible; MSIE 3.0; AOL 3.0; Windows 95)",
72 "3",
73 3,
74 0,
75 "AOL Browser",
76 "Win95",
77 undef,
78 ["ie", "ie3", "windows", "win32", "win95", "aol", "aol3"],
79 ],
80 [
81 "Mozilla/2.0 (compatible; MSIE 4.0; Windows 95)",
82 "4",
83 4,
84 0,
85 "MSIE",
86 "Win95",
87 undef,
88 ["ie", "ie4", "ie4up", "windows", "win32", "win95"],
89 ],
90 [
91 "Mozilla/3.0 (compatible; MSIE 4.0; Windows 95)",
92 "4.0",
93 4,
94 0,
95 "MSIE",
96 "Win95",
97 undef,
98 ["ie", "ie4", "ie4up", "windows", "win32", "win95"],
99 ],
100 [
101 "Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)",
102 "4.01",
103 4,
104 0.01,
105 "MSIE",
106 "Win95",
107 undef,
108 ["ie", "ie4", "ie4up", "windows", "win32", "win95"],
109 ],
110 [
111 "Mozilla/4.0 (compatible; MSIE 5.0b2; Windows NT)",
112 "5.0",
113 5,
114 0,
115 "MSIE",
116 "WinNT",
117 undef,
118 ["ie", "ie5", "ie5up", "ie4up", "windows", "win32", "winnt"],
119 ],
120 [
121 "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)",
122 "5.5",
123 5,
124 0.5,
125 "MSIE",
126 "WinNT",
127 undef,
128 [
129 "ie",
130 "ie5",
131 "ie5up",
132 "ie55",
133 "ie55up",
134 "ie4up",
135 "windows",
136 "win32",
137 "winnt",
138 ],
139 ],
140 [
141 "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) via proxy gateway Something/1.23",
142 "5.5",
143 5,
144 0.5,
145 "MSIE",
146 "Win2k",
147 undef,
148 [
149 "ie",
150 "ie5",
151 "ie5up",
152 "ie55",
153 "ie55up",
154 "ie4up",
155 "windows",
156 "win32",
157 "winnt",
158 "win2k",
159 ],
160 ],
161 [
162 "Mozilla/3.0 (Macintosh; I; PPC)",
163 "3.0",
164 3,
165 0,
166 "Netscape",
167 "Mac",
168 undef,
169 ["netscape", "nav3", "mac", "macppc"],
170 ],
171 [
172 "Mozilla/4.0 (compatible; MSIE 5.0; Win32)",
173 "5.0",
174 5,
175 0,
176 "MSIE",
177 undef,
178 undef,
179 ["ie", "ie4up", "ie5", "ie5up", "windows", "win32"],
180 ],
181 [
182 "Mozilla/4.0 (compatible; Opera/3.0; Windows 4.10) 3.50",
183 "3.0",
184 3,
185 0,
186 "Opera",
187 undef,
188 undef,
189 ["opera", "opera3", "windows"],
190 ],
191 [
192 "Mozilla/4.0 (compatible; MSIE 5.0b1; Windows NT 5.0)",
193 "5.0",
194 5,
195 0,
196 "MSIE",
197 "Win2k",
198 undef,
199 [
200 "ie",
201 "ie4up",
202 "ie5",
203 "ie5up",
204 "windows",
205 "win32",
206 "winnt",
207 "win2k",
208 ],
209 ],
210 [
211 "Mozilla/4.06 [en] (Win98; I ;Nav)",
212 "4.06",
213 4,
214 0.06,
215 "Netscape",
216 "Win98",
217 undef,
218 ["netscape", "nav4", "nav4up", "windows", "win32", "win98"],
219 ],
220 [
221 "Mozilla/4.5 [en] (X11; I; FreeBSD 2.2.7-RELEASE i386)",
222 "4.5",
223 4,
224 0.5,
225 "Netscape",
226 "Unix",
227 undef,
228 [
229 "netscape",
230 "nav4",
231 "nav4up",
232 "nav45",
233 "nav45up",
234 "bsd",
235 "freebsd",
236 "unix",
237 "x11",
238 ],
239 ],
240 [
241 "Mozilla/3.03Gold (Win95; I)",
242 "3.03",
243 3,
244 0.03,
245 "Netscape",
246 "Win95",
247 undef,
248 ["netscape", "nav3", "navgold", "windows", "win32", "win95"],
249 ],
250 ["Wget/1.4.5", "1.4", 1, 0.4, undef, undef, undef, ["wget", "robot"]],
251 [
252 "libwww-perl/5.11",
253 "5.11",
254 5,
255 0.11,
256 undef,
257 undef,
258 undef,
259 ["lwp", "robot"],
260 ],
261 [
262 "GetRight/3.2.1",
263 "3.2",
264 3,
265 0.2,
266 undef,
267 undef,
268 undef,
269 ["getright", "robot"],
270 ],
271 [
272 "Mozilla/3.0 (compatible; StarOffice/5.1; Linux)",
273 "5.1",
274 5,
275 0.1,
276 undef,
277 "Linux",
278 undef,
279 ["linux", "unix", "staroffice"],
280 ],
281 [
282 "Mozilla/3.0 (compatible; StarOffice/5.1; Win32)",
283 "5.1",
284 5,
285 0.1,
286 undef,
287 undef,
288 undef,
289 ["win32", "windows", "staroffice"],
290 ],
291 [
292 "iCab/Pre2.0 (Macintosh; I; PPC)",
293 "2.0",
294 2,
295 0,
296 undef,
297 "Mac",
298 undef,
299 ["mac", "macppc", "icab"],
300 ],
301 [
302 "Konqueror/1.1.2",
303 "1.1",
304 1,
305 0.1,
306 undef,
307 undef,
308 undef,
309 [
310 "konqueror"
311 ],
312 [
313 "robot", # RT #30705
314 ],
315 ],
316 [
317 "Lotus-Notes/4.5 ( OS/2 )",
318 "4.5",
319 4,
320 0.5,
321 undef,
322 "OS2",
323 undef,
324 ["lotusnotes", "os2"],
325 ],
326 #["Java1.0.2", "0.0", 0, 0, undef, undef, undef, ["java"]],
327 [
328 "Googlebot/1.0 (googlebot\@googlebot.com http://googlebot.com/)",
329 "1.0",
330 1,
331 0,
332 undef,
333 undef,
334 undef,
335 ["google", "robot"],
336 ],
337 ["Nokia-WAP-Toolkit/1.3beta", "1.3", 1, 0.3, undef, undef, undef, ["wap"]],
338 ["Nokia7110/1.0 (30.05)", "1.0", 1, 0, undef, undef, undef, ["wap"]],
339 ["UP.Browser/4.1.2a-XXXX", "4.1", 4, 0.1, undef, undef, undef, ["wap"]],
340 ["Wapalizer/1.0", "1.0", 1, 0, undef, undef, undef, ["wap"]],
341 ["YourWap/1.16", "1.16", 1, 0.16, undef, undef, undef, ["wap"]],
342 [
343 "AmigaVoyager/3.3.50 (AmigaOS/PPC)",
344 "3.3",
345 3,
346 0.3,
347 undef,
348 undef,
349 undef,
350 ["amiga"],
351 ],
352 [
353 "fetch/1.0 FreeBSD/4.0-CURRENT (i386)",
354 "1.0",
355 1,
356 0,
357 undef,
358 "Unix",
359 undef,
360 ["bsd", "freebsd", "unix", "robot"],
361 ],
362 [
363 "Emacs-W3/2.1.105 URL/1.267 ((Unix?) ; TTY ; sparc-sun-solaris2.3)",
364 "2.1",
365 2,
366 0.1,
367 undef,
368 "Unix",
369 undef,
370 ["emacs", "sun", "unix"],
371 ],
372 [
373 "Mozilla/5.001 (windows; U; NT4.0; en-us) Gecko/25250101",
374 "5.001",
375 5,
376 0.001,
377 "Netscape",
378 "WinNT",
379 undef,
380 [
381 "netscape",
382 "nav4up",
383 "nav45up",
384 "windows",
385 "winnt",
386 "win32",
387 "gecko",
388 "nav6",
389 "nav6up",
390 "mozilla",
391 "gecko",
392 ],
393 ],
394 [
395 "Mozilla/5.001 (Macintosh; N; PPC; ja) Gecko/25250101 MegaCorpBrowser/1.0 (MegaCorp, Inc.)",
396 "5.001",
397 5,
398 0.001,
399 "Netscape",
400 "Mac",
401 undef,
402 [
403 "netscape",
404 "nav4up",
405 "nav45up",
406 "nav6",
407 "nav6up",
408 "mac",
409 "macppc",
410 "mozilla",
411 "gecko",
412 ],
413 ],
414 [
415 "Mozilla/9.876 (X11; U; Linux 2.2.12-20 i686, en) Gecko/25250101 Netscape/5.432b1 (C-MindSpring)",
416 "5.432",
417 5,
418 0.432,
419 "Netscape",
420 "Linux",
421 undef,
422 [
423 "netscape",
424 "nav4up",
425 "nav45up",
426 "nav6",
427 "nav6up",
428 "linux",
429 "unix",
430 "mozilla",
431 "gecko",
432 "x11",
433 ],
434 ],
435 [
436 "TinyBrowser/2.0 (TinyBrowser Comment) Gecko/20201231",
437 "2.0",
438 2,
439 0,
440 undef,
441 undef,
442 undef,
443 ["gecko"],
444 ],
445 [
446 "TinyBrowser/2.0 (TinyBrowser Comment) Gecko/20201231",
447 "2.000",
448 2,
449 0,
450 undef,
451 undef,
452 undef,
453 ["gecko"],
454 ],
455 [
456 "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040619 Firefox/0.9",
457 "0.9",
458 0,
459 0.9,
460 "Firefox",
461 "Unix",
462 "1.7",
463 ["unix", "freebsd", "bsd", "x11", "firefox", "gecko"],
464 ],
465 [
466 "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.9",
467 "0.9",
468 0,
469 0.9,
470 "Firefox",
471 "WinXP",
472 "1.7",
473 ["windows", "win32", "winnt", "winxp", "firefox", "gecko"],
474 ],
475 [
476 "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a) Gecko/20040416 Firefox/0.8.0+",
477 "0.8",
478 0,
479 0.8,
480 "Firefox",
481 "Win2k",
482 "1.8a",
483 ["windows", "win32", "winnt", "win2k", "firefox", "gecko"],
484 ],
485 [
486 "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.6) Gecko/20040207 Firefox/0.8",
487 "0.8",
488 0,
489 0.8,
490 "Firefox",
491 "Linux",
492 "1.6",
493 ["unix", "linux", "x11", "firefox", "gecko"],
494 ],
495 [
496 "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20031002 Mozilla Firebird/0.6.1",
497 "0.6",
498 0,
499 0.6,
500 "Firefox",
501 "Linux",
502 "1.5a",
503 ["unix", "linux", "x11", "firefox", "gecko"],
504 ],
505 [
506 "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.3a) Gecko/20021207 Phoenix/0.5",
507 "0.5",
508 0,
509 0.5,
510 "Firefox",
511 "WinNT",
512 "1.3a",
513 ["windows", "win32", "winnt", "firefox", "gecko"],
514 ],
515 [
516 "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; OfficeLive",
517 "7.0",
518 7,
519 0,
520 "MSIE",
521 "WinVista",
522 undef,
523 [
524 "windows",
525 "win32",
526 "winnt",
527 "winvista",
528 "dotnet",
529 "ie",
530 "ie7",
531 "ie4up",
532 "ie5up",
533 "ie55up",
534 ],
535 ],
536 [
537 "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.31 Safari/530.5",
538 "2.0",
539 2,
540 0,
541 "Chrome",
542 "WinVista",
543 undef,
544 [
545 "windows",
546 "win32",
547 "winnt",
548 "winvista",
549 "chrome",
550 ],
551 [
552 "safari",
553 "gecko",
554 ],
555 ],
556 # RT #48727
557 [
558 "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.19.2 (KHTML, like Gecko) Version/4.0.2 Safari/530.19.1",
559 "4.0",
560 4,
561 0,
562 "Safari",
563 "WinVista",
564 undef,
565 [
566 "windows",
567 "win32",
568 "winnt",
569 "winvista",
570 "safari",
571 ],
572 [
573 "gecko",
574 ],
575 ],
576 [
577 "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1",
578 "1.25",
579 1,
580 0.25,
581 "Safari",
582 "Mac OS X",
583 undef,
584 [
585 "mac",
586 "macosx",
587 "macppc",
588 "safari",
589 ],
590 [
591 "gecko",
592 ],
593 ],
594 [
595 "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/106.2 (KHTML, like Gecko) Safari/100.1",
596 "1.0",
597 1,
598 0,
599 "Safari",
600 "Mac OS X",
601 undef,
602 [
603 "mac",
604 "macosx",
605 "macppc",
606 "safari",
607 ],
608 [
609 "gecko",
610 ],
611 ],
612 [
613 "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/74 (KHTML, like Gecko) Safari/74",
614 "0.74",
615 0,
616 0.74,
617 "Safari",
618 "Mac OS X",
619 undef,
620 [
621 "mac",
622 "macosx",
623 "macppc",
624 "safari",
625 ],
626 [
627 "gecko",
628 ],
629 ],
630 [
631 "BlackBerry7730/3.7.1 UP.Link/5.1.2.5",
632 "3.7",
633 3,
634 0.7,
635 undef,
636 undef,
637 undef,
638 ["blackberry"],
639 ],
640 [
641 "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)",
642 "6.0",
643 6,
644 0,
645 "MSIE",
646 "Win2k",
647 undef,
648 [
649 "windows",
650 "winnt",
651 "win2k",
652 "win32",
653 "ie",
654 "ie4up",
655 "ie5up",
656 "ie55up",
657 "ie6",
658 "dotnet",
659 ],
660 ],
661 [
662 "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)",
663 "6.0",
664 6,
665 0,
666 "MSIE",
667 "WinXP",
668 undef,
669 [
670 "windows",
671 "winnt",
672 "winxp",
673 "win32",
674 "ie",
675 "ie4up",
676 "ie5up",
677 "ie55up",
678 "ie6",
679 ],
680 ],
681 [
682 "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)",
683 "6.0",
684 6,
685 0,
686 "MSIE",
687 "WinXP",
688 undef,
689 [
690 "windows",
691 "winnt",
692 "winxp",
693 "win32",
694 "ie",
695 "ie4up",
696 "ie5up",
697 "ie55up",
698 "ie6",
699 "dotnet",
700 ],
701 ],
702 [
703 "Mozilla/4.0 (compatible; MSIE 5.22; Mac_PowerPC) ",
704 "5.22",
705 5,
706 0.22,
707 "MSIE",
708 "Mac",
709 undef,
710 ["mac", "macppc", "ie", "ie4up", "ie5", "ie5up"],
711 ],
712 [
713 "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02",
714 "7.02",
715 7,
716 0.02,
717 "Netscape",
718 "Mac OS X",
719 "1.0.2",
720 [
721 "mac",
722 "macppc",
723 "netscape",
724 "nav4up",
725 "nav45up",
726 "nav6up",
727 "gecko",
728 "macosx",
729 "mozilla",
730 ],
731 ],
732 [
733 "Mozilla/5.0 (X11; U; Linux 2.4.3-20mdk i586; en-US; rv:0.9.1) Gecko/20010611",
734 "5",
735 5,
736 0,
737 "Netscape",
738 "Linux",
739 "0.9.1",
740 [
741 "linux",
742 "netscape",
743 "nav4up",
744 "nav45up",
745 "nav6",
746 "nav6up",
747 "unix",
748 "x11",
749 "gecko",
750 "mozilla",
751 ],
752 ],
753 [
754 "Mozilla/5.0 (SymbianOS/9.1; U; en-us) AppleWebKit/413 (KHTML, like Gecko) Safari/413 UP.Link/6.3.1.15.0",
755 4.13,
756 4,
757 0.13,
758 "Safari",
759 undef,
760 undef,
761 [
762 "safari",
763 ],
764 [
765 "gecko",
766 ],
767 ],
768 [
769 "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008062901 IceWeasel/3.0",
770 3.0,
771 3,
772 0,
773 "Iceweasel",
774 undef,
775 undef,
776 ["windows", "win32", "winnt", "winxp", "firefox", "gecko",],
777 ],
778 [
779 "libcurl-agent/1.0",
780 1,
781 1,
782 0,
783 "curl",
784 undef,
785 undef,
786 ["curl"],
787 ],
788 [
789 "puf/0.93.2a (Linux 2.4.20-19.9; i686)",
790 0.93,
791 0,
792 0.93,
793 "puf",
794 undef,
795 undef,
796 ["puf","robot",],
797 ["mobile",],
798 ],
799 [
800 "Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_0_2 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5C1 Safari/525.20",
801 undef,
802 undef,
803 undef,
804 "safari",
805 undef,
806 undef,
807 ["safari", "mobile"],
808 ],
809 # test for uninitialized value warnings RT #8547
810 [
811 "Internetf Explorer 6 (MSIE 6; Windows XP)",
812 ],
813 # test for uninitialized value warnings RT #8547
814 [
815 "Links (2.1pre15; Linux 2.4.26-vc4 i586; x)",
816 ],
817
818 # These tests all have issues with returning undef rather than 0 for
819 # version numbers. Need to explore this to see what the correct behaviour
820 # should be
821
822 #[
823 # "AmigaVoyager (compatible; AmigaVoyager; AmigaOS)",
824 # "0.0",
825 # 0,
826 # 0,
827 # undef,
828 # undef,
829 # undef,
830 # ["amiga"],
831 #],
832 #[
833 # "AvantGo 3.2 (compatible; AvantGo 3.2)",
834 # "0.0",
835 # 0,
836 # 0,
837 # undef,
838 # undef,
839 # undef,
840 # ["palm", "avantgo"],
841 #],
842 #["Nothing", undef, undef, 0, undef, undef, undef, [""]], # does this make sense?
843 #[undef, "0.0", 0, 0, undef, undef, undef, [""]],
844 );
845
846
847 use YAML::Tiny qw( Dump DumpFile );
848
849 my $string = Dump( @tests );
850 #print $string;
851
852 my @yaml = ( );
853
854 foreach my $test ( @tests ) {
855 my ( $ua, $version, $major, $minor, $browser, $os, $other, $match, $no_match ) = @{$test};
856 my $desc = {
857 useragent => $ua,
858 version => $version,
859 major => $major,
860 minor => $minor,
861 browser => $browser,
862 os => $os,
863 other => $other,
864 match => $match,
865 no_match => $no_match,
866 };
867
868 push @yaml, $desc;
869
870 }
871
872 my $yaml = Dump ( @yaml );
873
874 print $yaml;
875
876 DumpFile( 'useragents.yaml', @yaml );
11661166 version: 6.1
11671167 major: 6
11681168 minor: 0.1
1169 public_version: 6
1169 public_version: 6.1
11701170 public_major: 6
11711171 public_minor: 0.1
11721172 language: EN
12011201 match:
12021202 - mac
12031203 - realplayer
1204 minor: 1
1204 minor: 0.1
12051205 no_match:
12061206 - windows
12071207 os: ~
13461346 - mac
13471347 public_version: 3.6
13481348 public_major: 3
1349 public_minor: 6
1349 public_minor: 0.6
13501350 version: 3.6
13511351 major: 3
13521352 minor: 0.6
14731473 version: 3.6
14741474 major: 3
14751475 minor: .6
1476 ---
1477 browser_string: ~
1478 match:
1479 - safari
1480 no_match: ~
1481 os: ~
1482 other: ~
1483 useragent: 'Mozilla/5.0 (SymbianOS/9.4; Series60/5.0 Nokia5230/20.0.005; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/525 (KHTML, like Gecko) Version/3.0 BrowserNG/7.2.3'
1484 language: ~
1485 country: ~
1486 public_version: 3.0
1487 public_major: 3
1488 public_minor: 0
1489 version: 5.25
1490 major: 5
1491 minor: .25
1492 ---
1493 useragent: 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en) AppleWebKit/522.13.1 (KHTML, like Gecko) Version/3.0.2 Safari/522.13.1'
1494 match:
1495 - windows
1496 - winnt
1497 - win2k
1498 - win32
1499 - safari
1500 browser_string: Safari
1501 os: Win2k
1502 public_version: 3.0
1503 public_major: 3
1504 public_minor: 0
1505 ---
1506 useragent: 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/419 (KHTML, like Gecko) Safari/419.3'
1507 match:
1508 - mac
1509 - macosx
1510 - macppc
1511 - safari
1512 browser_string: Safari
1513 os: Mac OS X
1514 public_version: 2.0
1515 public_major: 2
1516 public_minor: 0
1517 ---
1518 useragent: 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4'
1519 match:
1520 - mac
1521 - macosx
1522 - macppc
1523 - firefox
1524 browser_string: Firefox
1525 os: Mac OS X
1526 public_version: 2.0
1527 public_major: 2
1528 public_minor: 0
1529 engine_version: 1.8
1530 engine_major: 1
1531 engine_minor: 0.8
1532 ---
1533 useragent: 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en) AppleWebKit/522.12.1 (KHTML, like Gecko) Version/3.0.1 Safari/522.12.2'
1534 match:
1535 - safari
1536 - windows
1537 - winnt
1538 - win2k
1539 - win32
1540 browser_string: Safari
1541 os: Win2k
1542 public_version: 3.0
1543 public_major: 3
1544 public_minor: 0
1545 ---
1546 useragent: 'Mozilla/5.0 (compatible; Konqueror/3.5; Linux; X11; x86_64) KHTML/3.5.6 (like Gecko) (Kubuntu)'
1547 match:
1548 - konqueror
1549 - linux
1550 - unix
1551 - x11
1552 os: Linux
1553 public_version: 3.5
1554 public_major: 3
1555 public_minor: 0.5
1556 ---
1557 useragent: 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/419 (KHTML, like Gecko) Safari/419.3'
1558 match:
1559 - safari
1560 - mac
1561 - macosx
1562 browser_string: Safari
1563 os: Mac OS X
1564 public_version: 2.0
1565 public_major: 2
1566 public_minor: 0
1567 ---
1568 useragent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.4) Gecko/20061201 Galeon/2.0.2 (Ubuntu package 2.0.2-4ubuntu1) Firefox/2.0.0.4 (Ubuntu-feisty)'
1569 match:
1570 - linux
1571 - unix
1572 - x11
1573 - firefox
1574 browser_string: Firefox
1575 os: Linux
1576 public_version: 2.0
1577 public_major: 2
1578 public_minor: 0
1579 engine_version: 1.8
1580 engine_major: 1
1581 engine_minor: 0.8
1582 ---
1583 useragent: 'Mozilla/5.0 (X11; U; Linux x86_64; en; rv:1.8.1.4) Gecko/20061201 Epiphany/2.18 Firefox/2.0.0.4 (Ubuntu-feisty)'
1584 match:
1585 - linux
1586 - unix
1587 - x11
1588 - firefox
1589 browser_string: Firefox
1590 os: Linux
1591 public_version: 2.0
1592 public_major: 2
1593 public_minor: 0
1594 engine_version: 1.8
1595 engine_major: 1
1596 engine_minor: 0.8
1597 ---
1598 useragent: 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070220 Firefox/2.0.0.2'
1599 match:
1600 - linux
1601 - unix
1602 - x11
1603 - firefox
1604 browser_string: Firefox
1605 os: Linux
1606 public_version: 2.0
1607 public_major: 2
1608 public_minor: 0
1609 engine_version: 1.8
1610 engine_major: 1
1611 engine_minor: 0.8
1612 ---
1613 useragent: 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5'
1614 match:
1615 - linux
1616 - unix
1617 - x11
1618 - firefox
1619 browser_string: Firefox
1620 os: Linux
1621 public_version: 1.5
1622 public_major: 1
1623 public_minor: 0.5
1624 engine_version: 1.8
1625 engine_major: 1
1626 engine_minor: 0.8
1627 ---
1628 useragent: 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)'
1629 match:
1630 - windows
1631 - win32
1632 - winnt
1633 - winxp
1634 - ie
1635 - ie6
1636 - ie55up
1637 - ie4up
1638 - dotnet
1639 browser_string: MSIE
1640 os: WinXP
1641 public_version: 6.0
1642 public_major: 6
1643 public_minor: 0
1644 ---
1645 useragent: 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12'
1646 match:
1647 - windows
1648 - win32
1649 - winnt
1650 - winxp
1651 - firefox
1652 browser_string: Firefox
1653 os: WinXP
1654 public_version: 1.5
1655 public_major: 1
1656 public_minor: 0.5
1657 engine_version: 1.8
1658 engine_major: 1
1659 engine_minor: 0.8
1660 ---
1661 useragent: 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4'
1662 match:
1663 - mac
1664 - macosx
1665 - firefox
1666 browser_string: Firefox
1667 os: Mac OS X
1668 public_version: 2.0
1669 public_major: 2
1670 public_minor: 0
1671 engine_version: 1.8
1672 engine_major: 1
1673 engine_minor: 0.8
1674 ---
1675 useragent: 'Opera/9.21 (Macintosh; Intel Mac OS X; U; en)'
1676 match:
1677 - mac
1678 - macosx
1679 - opera
1680 browser_string: Opera
1681 os: Mac OS X
1682 public_version: 9.21
1683 public_major: 9
1684 public_minor: 0.21
1685 ---
1686 useragent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.6 (KHTML, like Gecko) Chrome/6.0.495.0 Safari/534.6'
1687 match:
1688 - linux
1689 - unix
1690 - x11
1691 - chrome
1692 browser_string: Chrome
1693 os: Linux
1694 public_version: 6.0
1695 public_major: 6
1696 public_minor: 0
1697 engine_string: KHTML
1698 ---
1699 useragent: 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8'
1700 match:
1701 - windows
1702 - winxp
1703 - safari
1704 browser_string: Safari
1705 os: WinXP
1706 public_version: 5.0
1707 public_major: 5
1708 public_minor: 0
1709 ---
1710 useragent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4'
1711 match:
1712 - linux
1713 - unix
1714 - x11
1715 - chrome
1716 browser_string: Chrome
1717 os: Linux
1718 public_version: 5.0
1719 public_major: 5
1720 public_minor: 0
1721 engine_string: KHTML
1722 ---
1723 useragent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8'
1724 match:
1725 - linux
1726 - unix
1727 - x11
1728 - firefox
1729 browser_string: Firefox
1730 os: Linux
1731 public_version: 3.6
1732 public_major: 3
1733 public_minor: 0.6
1734 engine_version: 1.9
1735 engine_major: 1
1736 engine_minor: 0.9
1737 ---
1738 useragent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20091023 Galeon/2.0.7 (Ubuntu 2.0.7-1ubuntu2)'
1739 match:
1740 - linux
1741 - unix
1742 - x11
1743 - netscape
1744 #browser_string: Galeon
1745 browser_string: Netscape
1746 os: Linux
1747 #public_version: 2.0
1748 #public_major: 2
1749 #public_minor: 0.0
1750 engine_version: 1.9
1751 engine_major: 1
1752 engine_minor: 0.9
1753 ---
1754 useragent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100722 SeaMonkey/2.0.6'
1755 match:
1756 - linux
1757 - unix
1758 - x11
1759 - netscape
1760 #browser_string: SeaMonkey
1761 browser_string: Netscape
1762 os: Linux
1763 #public_version: 2.0
1764 #public_major: 2
1765 #public_minor: 0
1766 engine_version: 1.9
1767 engine_major: 1
1768 engine_minor: 0.9
1769 ---
1770 useragent: 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.36 Safari/534.3'
1771 match:
1772 - windows
1773 - winxp
1774 - chrome
1775 browser_string: Chrome
1776 os: WinXP
1777 public_version: 6.0
1778 public_major: 6
1779 public_minor: 0
1780 engine_string: KHTML
1781 language: EN
1782 country: US
1783 ---
1784 useragent: 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; eMusic DLM/4; .NET4.0C)'
1785 match:
1786 - windows
1787 - winxp
1788 - ie
1789 - ie8
1790 browser_string: MSIE
1791 os: WinXP
1792 public_version: 8.0
1793 public_major: 8
1794 public_minor: 0
1795 ---
1796 useragent: 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729; .NET4.0C)'
1797 match:
1798 - windows
1799 - winxp
1800 - firefox
1801 browser_string: Firefox
1802 os: WinXP
1803 public_version: 3.6
1804 public_major: 3
1805 public_minor: 0.6
1806 engine_version: 1.9
1807 engine_major: 1
1808 engine_minor: 0.9
1809 language: EN
1810 country: US
1811 ---
1812 useragent: 'Opera/9.80 (Windows NT 5.1; U; en) Presto/2.2.15 Version/10.10'
1813 match:
1814 - windows
1815 - winxp
1816 - opera
1817 browser_string: Opera
1818 os: WinXP
1819 public_version: 10.10
1820 public_major: 10
1821 public_minor: 0.10
1822 language: EN
1823 ---
1824 useragent: 'Mozilla/5.0 (Linux; U; Android 1.5; en-us; Google Ion Build/CRB43) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1'
1825 match:
1826 - safari
1827 - mobile
1828 - linux
1829 - android
1830 browser_string: Safari
1831 public_version: 3.1
1832 public_major: 3
1833 public_minor: 0.1
1834 version: 5.25
1835 major: 5
1836 minor: 0.25
1837 engine: 5.25
1838 engine_string: KHTML
1839 language: EN
1840 country: US
1841 ---
1842 useragent: 'Mozilla/5.0 (compatible; Konqueror/4.4; Linux; X11; x86_64) KHTML/4.4.2 (like Gecko) Kubuntu'
1843 match:
1844 - linux
1845 - unix
1846 - x11
1847 - konqueror
1848 os: Linux
1849 public_version: 4.4
1850 public_major: 4
1851 public_minor: 0.4
1852 engine_string: KHTML
1853 ---
1854 useragent: 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/48 (like Gecko) Safari/48'
1855 match:
1856 - mac
1857 - macosx
1858 - macppc
1859 - safari
1860 browser_string: Safari
1861 os: Mac OS X
1862 public_version: 0.8
1863 public_major: 0
1864 public_minor: 0.8
1865 ---
1866 useragent: 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/60 (like Gecko) Safari/60'
1867 match:
1868 - mac
1869 - macosx
1870 - macppc
1871 - safari
1872 browser_string: Safari
1873 os: Mac OS X
1874 public_version: 0.8
1875 public_major: 0
1876 public_minor: 0.8
1877 ---
1878 useragent: 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/73 (KHTML, like Gecko) Safari/73'
1879 match:
1880 - mac
1881 - macosx
1882 - macppc
1883 - safari
1884 browser_string: Safari
1885 os: Mac OS X
1886 public_version: 0.9
1887 public_major: 0
1888 public_minor: 0.9
1889 engine_string: KHTML
1890 ---
1891 useragent: 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/85 (KHTML, like Gecko) Safari/85'
1892 match:
1893 - mac
1894 - macosx
1895 - macppc
1896 - safari
1897 browser_string: Safari
1898 os: Mac OS X
1899 public_version: 1.0
1900 public_major: 1
1901 public_minor: 0
1902 engine_string: KHTML
1903 ---
1904 useragent: 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.8'
1905 match:
1906 - mac
1907 - macosx
1908 - macppc
1909 - safari
1910 browser_string: Safari
1911 os: Mac OS X
1912 public_version: 1.2
1913 public_major: 1
1914 public_minor: 0.2
1915 engine_string: KHTML
1916 ---
1917 useragent: 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12'
1918 match:
1919 - mac
1920 - macosx
1921 - macppc
1922 - safari
1923 browser_string: Safari
1924 os: Mac OS X
1925 public_version: 1.2
1926 public_major: 1
1927 public_minor: 0.2
1928 engine_string: KHTML
1929 ---
1930 useragent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.4) Gecko/20061201 Firefox/2.0.0.4 (Ubuntu-feisty)'
1931 match:
1932 - linux
1933 - unix
1934 - x11
1935 - firefox
1936 browser_string: Firefox
1937 os: Linux
1938 public_version: 2.0
1939 public_major: 2
1940 public_minor: 0
1941 engine_string: Gecko
1942 engine_version: 1.8
1943 engine_major: 1
1944 engine_minor: 0.8
1945 ---
1946 useragent: 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en) AppleWebKit/522.11.3 (KHTML, like Gecko) Version/3.0 Safari/522.11.3'
1947 match:
1948 - windows
1949 - winnt
1950 - win2k
1951 - win32
1952 - safari
1953 browser_string: Safari
1954 os: Win2k
1955 public_version: 3.0
1956 public_major: 3
1957 public_minor: 0
1958 engine_string: KHTML
1959 ---
1960 useragent: 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322'
1961 match:
1962 - windows
1963 - winnt
1964 - win2k
1965 - win32
1966 - ie
1967 - ie4up
1968 - ie5up
1969 - ie55up
1970 - ie6
1971 - dotnet
1972 browser_string: MSIE
1973 os: Win2k
1974 public_version: 6.0
1975 public_major: 6
1976 public_minor: 0
1977 ---
1978 useragent: 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4'
1979 match:
1980 - windows
1981 - winnt
1982 - win2k
1983 - win32
1984 - firefox
1985 - gecko
1986 browser_string: Firefox
1987 os: Win2k
1988 public_version: 2.0
1989 public_major: 2
1990 public_minor: 0
1991 engine_string: Gecko
1992 engine_version: 1.8
1993 engine_major: 1
1994 engine_minor: 0.8