2013-08-22 22:41:43 +04:00
|
|
|
|
|
|
|
function handleRequest(request, response)
|
|
|
|
{
|
|
|
|
// avoid confusing cache behaviors
|
|
|
|
response.setHeader("Cache-Control", "no-cache", false);
|
2016-02-20 02:06:46 +03:00
|
|
|
response.setHeader("Content-Type", "text/html", false);
|
2013-08-22 22:41:43 +04:00
|
|
|
response.setHeader("Access-Control-Allow-Origin", "*", false);
|
|
|
|
|
|
|
|
// used by test_user_agent tests
|
2016-02-20 02:06:46 +03:00
|
|
|
response.write(
|
|
|
|
"<html><body>\
|
|
|
|
<script type='text/javascript'>\
|
|
|
|
var msg = {\
|
|
|
|
header: '" + request.getHeader('User-Agent') + "',\
|
|
|
|
nav: navigator.userAgent\
|
|
|
|
};\
|
|
|
|
self.parent.postMessage(msg, '*');\
|
|
|
|
</script>\
|
|
|
|
</body></html>"
|
|
|
|
);
|
2013-08-22 22:41:43 +04:00
|
|
|
}
|