Closed Bug 640034 Opened 13 years ago Closed 13 years ago

stage webofwonder.org write a trafficscript for mobile

Categories

(mozilla.org Graveyard :: Server Operations, task)

All
Other
task
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ozten, Assigned: oremj)

References

()

Details

Following in the footsteps of Bug#626871...

We need Zeus to set do UA and Cookie sniffing for mobile.

This is part of the mobile release in 2 weeks.
In Bug#626871#c3 I think I see a bug. 

http.addResponseHeader("Vary", "User-Agent"); 

Shouldn't that line execute for all requests?
Assignee: server-ops → jeremy.orem+bugs
We are updating stage to mobile code.

This won't work properly until Zeus' traffic script is updated on stage.
Severity: minor → major
Added this to stage:

$ua_f = "(android|fennec|iemobile|iphone|opera (mini|mobi))";
$mc_f = "mamo";

$ua = string.lowercase(http.getHeader( "User-Agent" ));
$mc = http.getCookie($mc_f);

if(($mc != "off" && string.regexmatch($ua, $ua_f)) || $mc == "on") {
  http.addHeader("X-Mobile", 1);
  http.cache.setkey("mobile");
  http.addResponseHeader("Vary", "Cookie,User-Agent");

}
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Awesome, thanks!

If you're still in there, can you add ipad?

$ua_f = "(android|fennec|iemobile|ipad|iphone|opera (mini|mobi))";
yeah, done.
Product: mozilla.org → mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.