pagespeed/ngx_pagespeed — pull request #150 by jeffkaufman (2013-01-25 21:53:53+00:00)
Title: experiments: support RunExperiment

Before the experiment code was just setting the need_to_store_experiment_data
option but nothing was looking at that option. Rewrote the code, basing it on
InstawebContext::SetFuriousStateAndCookie, in order to actually set the cookie
to support the experiment. There are tests for this functionality, but we're
waiting on issue #40 to be able to run them.

Manual testing (with line wrapping):

$ curl -s -D- http://localhost:8050/mod_pagespeed_example/ | grep GFURIOUS
Set-Cookie: _GFURIOUS=1; Expires=Fri, 01 Feb 2013 21:38:31 GMT;
Domain=.localhost; Path=/

$ curl -s -D- http://localhost:8050/mod_pagespeed_example/ | grep GFURIOUS
Set-Cookie: _GFURIOUS=2; Expires=Fri, 01 Feb 2013 21:42:56 GMT;
Domain=.localhost; Path=/

And it responds properly on receiving the cookie, although it did that before
this change too.