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

Failing user agents (Opera 7, 8 and Netscape 8) #6

Closed
jaraco opened this issue Jul 21, 2011 · 5 comments
Closed

Failing user agents (Opera 7, 8 and Netscape 8) #6

jaraco opened this issue Jul 21, 2011 · 5 comments

Comments

@jaraco
Copy link

jaraco commented Jul 21, 2011

These user agents parse fine:
Opera/9.20 (Windows NT 6.0; U; en), Opera 9, Windows Vista
Opera/9.00 (Windows NT 5.1; U; en), Opera 9, Windows XP

These fail to parse the version correctly, returning something like "Opera Mozilla/4.0" for browser:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.50
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.0
Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.02 [en]

This one fails to detect the browser altogether:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20060127 Netscape/8.1

@shon
Copy link
Owner

shon commented Jul 21, 2011

0.9.5 release with fix for this issue. Let me know if you face any issue with this release.

@shon shon closed this as completed Jul 21, 2011
@jaraco
Copy link
Author

jaraco commented Jul 21, 2011

Thanks. That was fast work. However, it seems the Netscape UA is still does not yield a browser.

>>> import httpagentparser
>>> httpagentparser.detect('Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20060127 Netscape/8.1')
{'os': {'version': 'NT 5.1', 'name': 'Windows'}}
>>> httpagentparser.__file__
'c:\\python\\lib\\site-packages\\httpagentparser-0.9.5-py2.7.egg\\httpagentparser\\__init__.pyc'

@shon
Copy link
Owner

shon commented Jul 21, 2011

Yeah just realized that. Patch is on the way.

@shon
Copy link
Owner

shon commented Jul 21, 2011

Released 0.9.6

@jaraco
Copy link
Author

jaraco commented Jul 21, 2011

Awesome. Fixes all our failing tests. Thanks so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants