Closed Bug 905537 Opened 11 years ago Closed 11 years ago

Add support for iPod Touch in useragent strings for platform detection

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.4

People

(Reporter: MattN, Assigned: dkl)

References

Details

Attachments

(1 file, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #834290 +++

Bug 834290 missed iPod Touch devices which are functionally pretty close to iPhones except lacking cellular functionality. The token is "iPod" instead of iPhone or iPad.
Will add this ASAP for you
Status: NEW → ASSIGNED
Attached patch 905537_1.patch (obsolete) — Splinter Review
Assignee: create-and-change → dkl
Attachment #790788 - Flags: review?(LpSolit)
Comment on attachment 790788 [details] [diff] [review]
905537_1.patch

From what I could see on the web, the UA string is of the form:

Mozila/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Geckto) Version/3.0 Mobile/3A101a Safari/419.3

So it won't match any of the OS 7, OS 6, ...., OS 3 regexps used to detect the OS. Only the last regexp will match. So only this last one should include iPod. The regexp for ARM is fine, though.
Attachment #790788 - Flags: review?(LpSolit) → review-
Attached patch 905537_2.patchSplinter Review
Attachment #790788 - Attachment is obsolete: true
Attachment #790859 - Flags: review?(LpSolit)
Comment on attachment 790859 [details] [diff] [review]
905537_2.patch

r=LpSolit
Attachment #790859 - Flags: review?(LpSolit) → review+
Flags: approval?
Flags: approval4.4?
Target Milestone: --- → Bugzilla 4.4
The first patch was better. Examples from [1] :
Mozilla/5.0 (iPod; U; CPU iPhone OS 4_3_3 like Mac OS X; ja-jp) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5
Mozilla/5.0 (iPod; U; CPU iPhone OS 4_3_1 like Mac OS X; zh-cn) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8G4 Safari/6533.18.5
Mozilla/5.0 (iPod; U; CPU iPhone OS 4_2_1 like Mac OS X; he-il) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5

The iOS version is now in the UA of the iPod Touch. I think iOS 3 are earlier may have been different.

[1] http://www.useragentstring.com/pages/Safari/
Flags: approval?
Flags: approval4.4?
Flags: approval4.4+
Flags: approval+
(In reply to Matthew N. [:MattN] from comment #6)
> The first patch was better.

The first patch wasn't better. The UA strings you pasted all contain iPhone already. They are already caught by the existing code.
Ah, sorry. I missed that because I also saw the ones like comment 3 which don't have both models.
Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bugzilla/trunk
modified Bugzilla/UserAgent.pm
Committed revision 8704.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
dkl: the checkin on the 4.4 branch is missing.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Missed that.

Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bugzilla/4.4
modified Bugzilla/UserAgent.pm
Committed revision 8594. 

dkl
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: