Don't hang on /status/ for newer Node
Summary: At some point, Node started requiring us to read data before we can get the 'end' event, it seems. Fixes T2953. Test Plan: Ran server in `--foreground` mode on node v0.11.0, made request to `/status/`, got response. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2953 Differential Revision: https://secure.phabricator.com/D5666
This commit is contained in:
@@ -182,6 +182,11 @@ var receive_server = http.createServer(function(request, response) {
|
||||
response.end();
|
||||
});
|
||||
} else if (request.url == '/status/') {
|
||||
request.on('data', function(data) {
|
||||
// We just ignore the request data, but newer versions of Node don't
|
||||
// get to 'end' if we don't process the data. See T2953.
|
||||
});
|
||||
|
||||
request.on('end', function() {
|
||||
var status = {
|
||||
'uptime': (new Date().getTime() - start_time),
|
||||
|
||||
Reference in New Issue
Block a user