2009-11-04 13:16:40 +03:00
|
|
|
function handleRequest(request, response) {
|
|
|
|
response.processAsync();
|
|
|
|
response.setStatusLine(request.httpVersion, 200, "OK");
|
|
|
|
response.setHeader("Content-Type", "text/html; charset=utf-8", false);
|
2009-11-18 15:44:17 +03:00
|
|
|
response.setHeader("Cache-Control", "no-cache", false);
|
2009-11-04 13:16:40 +03:00
|
|
|
|
|
|
|
response.write(
|
|
|
|
'<!DOCTYPE html>' +
|
|
|
|
'<div></div>' +
|
|
|
|
'<script>' +
|
|
|
|
'function doWrite() {' +
|
|
|
|
' document.write("<p></p>");' +
|
|
|
|
' parent.done();' +
|
|
|
|
' document.close();' +
|
|
|
|
'}' +
|
2011-04-17 03:39:34 +04:00
|
|
|
'setTimeout(doWrite, 0);' +
|
2009-11-04 13:16:40 +03:00
|
|
|
'</script>'
|
|
|
|
);
|
|
|
|
|
|
|
|
response.bodyOutputStream.flush();
|
|
|
|
// leave the stream open
|
|
|
|
}
|
|
|
|
|