Closed Bug 1060137 Opened 8 years ago Closed 7 years ago

b2g connects to virgilio.it instead of mobile.virgilio.it

Categories

(Web Compatibility :: Mobile, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: niccolocantu94, Unassigned, Mentored)

References

()

Details

(Whiteboard: [country-it] [serversniff] [sitewait])

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0 (Beta/Release)
Build ID: 20140804060850

Steps to reproduce:

1. open b2g browser
2. search "libero.it"


Actual results:

desktop webpage is shown


Expected results:

mobile webpage is shown
OS: All → Gonk (Firefox OS)
Version: Trunk → unspecified
The people behind the Web site http://libero.it/ needs to be contacted for asking them to send to Firefox OS the same content they send to Firefox on Android. The redirection is based on server side user agent detection.

You can see the differences in between the two User-Agent strings below:

# Firefox for Android (got mobile)
→ http --print hH GET http://www.libero.it/ 'User-Agent: Mozilla/5.0 (Android; Mobile; rv:30.0) Gecko/30.0 Firefox/30.0' | egrep -i '^HTTP/|^location:'
HTTP/1.1 302 Found
Location: http://m.libero.it/


# Firefox OS (got desktop)
→ http --print hH GET http://www.libero.it/ 'User-Agent: Mozilla/5.0 (Mobile; rv:30.0) Gecko/30.0 Firefox/30.0' | egrep -i '^HTTP/|^location:'
HTTP/1.1 200 OK
Mentor: kdubost
Status: UNCONFIRMED → NEW
Ever confirmed: true
Hardware: All → ARM
Whiteboard: [country-it] [serversniff] [contactready]
Wrong site in the first comment is not libero.it but virgilio.it
ops :)
libero.it is handled in bug 1060132

However, the analysis for Virgilio is pretty much the same: server-side browser sniffing.

Firefox Android and Safari on iPhone are redirected to http://rewrite.mobile.virgilio.it/switch.html?host=www.virgilio.it&uri=/&qs=, Firefox OS not redirected

Selected HTTP response headers (Firefox OS, Firefox on Android, Safari on iPhone):

Response for: 'Mozilla/5.0 (Mobile; rv:29.0) Gecko/29.0 Firefox/29.0'
Response Status: 200
content-length: 252048
content-type: text/html; charset=ISO-8859-1

Response for: 'Mozilla/5.0 (Android; Mobile; rv:26.0) Gecko/26.0 Firefox/26.0'
Response Status: 301
content-length: 292
location: http://rewrite.mobile.virgilio.it/switch.html?host=www.virgilio.it&uri=/&qs=
content-type: text/html; charset=iso-8859-1

Response for: 'Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25'
Response Status: 301
content-length: 292
location: http://rewrite.mobile.virgilio.it/switch.html?host=www.virgilio.it&uri=/&qs=
content-type: text/html; charset=iso-8859-1
Contacted by twitter the official account in italian https://twitter.com/Mte90Net/status/547030094666276864
Great, thank you!
Whiteboard: [country-it] [serversniff] [contactready] → [country-it] [serversniff] [sitewait]
Bug fixed, now HTTP request has status code 301 and redirects to:

Location: http://rewrite.mobile.virgilio.it/switch.html?host=www.virgilio.it&uri=/&qs=
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Resolution: INVALID → FIXED
Wow, that was fast. Congratulations! :)
Product: Tech Evangelism → Web Compatibility
You need to log in before you can comment on or make changes to this bug.