oalders/http-browserdetect

Warnings with IEMobile 11 on Windows Phone 8.1

oschwald opened this issue · 3 comments

Stack trace, which includes user-agent string:

'Use of uninitialized value $major in numeric eq (==) at /opt/perl5.16.3/lib/site_perl/5.16.3/HTTP/BrowserDetect.pm line 505, <GEN4> line 231.^J') called at /opt/perl5.16.3/lib/site_perl/5.16.3/HTTP/BrowserDetect.pm line 505
HTTP::BrowserDetect::_test('HTTP::BrowserDetect=HASH(0xd25fd50)') called at /opt/perl5.16.3/lib/site_perl/5.16.3/HTTP/BrowserDetect.pm line 264
HTTP::BrowserDetect::user_agent('HTTP::BrowserDetect=HASH(0xd25fd50)', 'Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; Microsoft; Virtual) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Chrome/32 Mobile Safari/537') called at /opt/perl5.16.3/lib/site_perl/5.16.3/HTTP/BrowserDetect.pm line 235
HTTP::BrowserDetect::new('HTTP::BrowserDetect', 'Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; Microsoft; Virtual) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Chrome/32 Mobile Safari/537') 

I just took a closer look at this UA to make a PR and it looks bogus to me. I am not sure what the module's policy on warnings from such strings is.

@dougwilson does this look like it could possibly be a valid UserAgent string?

I looked at it this morning was was thinking of submitting a PR tonight :)

Microsoft has not yet announced a finalized Windows Phone 8.1 UA AFAIK. That UA has a tag showing it is from the Phone emulator in the development kit. I think we should only change just enough to make the warning go away and nothing more.