Closed Bug 827678 Opened 10 years ago Closed 7 years ago

marca.com doesn't recognize B2G UA as mobile

Categories

(Web Compatibility :: Mobile, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: lmandel, Assigned: karlcow)

References

()

Details

(Whiteboard: [uaoverride] [country-es] [serversniff][sitewait])

Attachments

(1 file)

marca.com serves a desktop site to B2G. Bug 823364 added an UA override for this domain. The override should be removed once the domain serves mobile content to B2G. This bug tracks the evangelism for the site to recognize the B2G UA and the removal of the override at that time.
Blocks: marca.com
Whiteboard: [uaoverride]
Whiteboard: [uaoverride] → [uaoverride] [country-es]
There is clearly a user agent sniffing going on. It's not done server side apparently. On the client side I put my nose in the different JS, but I haven't found the one which was doing the redirection to http://www.marca.com/movil/

I need your help hallvord.
Assignee: nobody → kdubost
Status: NEW → ASSIGNED
Flags: needinfo?(hsteen)
Whiteboard: [uaoverride] [country-es] → [uaoverride] [country-es] [clientsniff]
I think it's server-side after all.. Consider

GET /movil/
Host: www.marca.com
User-Agent: Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0
-> 302

GET /movil/
Host: www.marca.com
User-Agent: Mozilla/5.0 (Android; rv:18.0) Gecko/18.0 Firefox/18.0
-> 200
Flags: needinfo?(hsteen)
Whiteboard: [uaoverride] [country-es] [clientsniff] → [uaoverride] [country-es] [serversniff]
but here you are asking for a different resource. :) /movil/ 
When requesting /movile/ there is indeed an additional server side redirect to send to a simpler version called /accesible/. I have seen that pattern in another bug. 

# Firefox OS 

GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, compress
Host: www.marca.com
User-Agent: Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0

HTTP/1.1 200 OK
Cache-Control: no-cache
Connection: keep-alive
Content-Encoding: gzip
Content-Length: 78983
Content-Type: text/html
Date: Wed, 21 Aug 2013 20:10:39 GMT
Server: nginx/1.2.7
Set-Cookie: MARCA_idusr=UhUev8CoFB8AACSP2fw-53a51ab97e6a3f035408e71ef062175e; expires=Sat, 20 Aug 2016 20:10:39 GMT; path=/; domain=.marca.com
X-Accel-Cache-Control: no-cache


GET /movil/ HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, compress
Host: www.marca.com
User-Agent: Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0

HTTP/1.1 302 Found
Cache-Control: no-cache
Connection: keep-alive
Content-Type: text/html
Date: Wed, 21 Aug 2013 20:12:43 GMT
Location: /accesible/index.html
Server: nginx/1.2.7
Transfer-Encoding: chunked
X-Accel-Cache-Control: no-cache




# Firefox for Android

GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, compress
Host: www.marca.com
User-Agent: Mozilla/5.0 (Android; Mobile; rv:18.0) Gecko/18.0 Firefox/18.0

HTTP/1.1 200 OK
Cache-Control: no-cache
Connection: keep-alive
Content-Encoding: gzip
Content-Length: 78812
Content-Type: text/html
Date: Wed, 21 Aug 2013 20:11:15 GMT
Server: nginx/1.2.7
X-Accel-Cache-Control: no-cache


GET /movil/ HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, compress
Host: www.marca.com
User-Agent: Mozilla/5.0 (Android; Mobile; rv:18.0) Gecko/18.0 Firefox/18.0

HTTP/1.1 200 OK
Cache-Control: no-cache
Connection: keep-alive
Content-Encoding: gzip
Content-Length: 4449
Content-Type: text/html
Date: Wed, 21 Aug 2013 20:12:36 GMT
Server: nginx/1.2.7
Set-Cookie: marca_movil=0%3B1377115956%3B2526fc56a563a668a8f661909be7fbce; path=/; domain=marca.com
X-Accel-Cache-Control: no-cache



But indeed it is server side

→ http -b GET http://www.marca.com/movil/ User-Agent:"$FOSUA" | grep -i mobile

<nothing>


→ http -b GET http://www.marca.com/movil/ User-Agent:"$FANUA" | grep -i mobile


function sasmobile(sas_pageid,sas_formatid,sas_target) {
document.write('<scr'+'ipt src="http://mobile.smartadserver.com/call2/pubmj/'+sas_pageid+'/'+sas_formatid+'/'+sas_master+'/'+sas_tmstp+'/'+escape(sas_target)+'?"></scr'+'ipt>');
img.src = 'http://mobile.smartadserver.com/call/clicpixel/'+sas_imageid+'/'+sas_pageid+'/'+sas_tmstp+'?';
sasmobile(sas_pageid,sas_formatid,sas_target);
<a href="http://mobile.smartadserver.com/call2/pubjumpmi/18983/134217/7462/S/[timestamp]/?">
<img src="http://mobile.smartadserver.com/call2/pubmi/18983/134217/7462/S/[timestamp]/?" border="0" alt="" /></a>
sasmobile(sas_pageid,sas_formatid,sas_target);
<a href="http://mobile.smartadserver.com/call2/pubjumpmi/18983/232463/14141/M/[timestamp]/?">
<img src="http://mobile.smartadserver.com/call2/pubmi/18983/232463/14141/M/[timestamp]/?" border="0" alt="" /></a>
Assignee: kdubost → nobody
Status: ASSIGNED → NEW
Whiteboard: [uaoverride] [country-es] [serversniff] → [uaoverride] [country-es] [serversniff][contactready]
They now have an English Web site too. But still with the same issues.
http://www.marca.com/en/

Contacted through http://www.marca.com/corporativo/contacto.html
Assignee: nobody → kdubost
Whiteboard: [uaoverride] [country-es] [serversniff][contactready] → [uaoverride] [country-es] [serversniff][sitewait]
Marca is part of Unidad Editorial 
http://www.unidadeditorial.com/

Their framework seems to be in python. According to the number of python devs working there.

Trying to contact http://twitter.com/MozWebCompat/status/434170598768377856
Status: NEW → ASSIGNED
Not sure if it fell through the crack. Probably my mistake. Let's try again.
I contacted again through private twitter.
The Web site doesn't exist anymore, there is a landing page which is the same for anyone.

Need to remove the UA override in Bug 1171828
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Blocks: 1171828
Product: Tech Evangelism → Web Compatibility
You need to log in before you can comment on or make changes to this bug.