1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-28 09:08:50 +02:00

webkit: support GET method

This commit is contained in:
kev 2015-01-06 21:57:53 +08:00
parent be9c3d3900
commit f04f792183

View File

@ -33,7 +33,13 @@ var ok = server.listen(port, function(request, response) {
} catch(ex) { } catch(ex) {
send(response, 400, ex); send(response, 400, ex);
} }
} else { } else if (request.method === 'GET') {
response.statusCode = 200;
response.setHeader('X-Powered-By', 'PhantomJS')
response.setHeader('Content-Type', 'text/plain')
response.write('Powered by PhantomJS 1.9.8');
response.close();
} else{
send(response, 405); send(response, 405);
} }
}); });