mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 11:30:55 +01:00
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:
parent
7b9b872b29
commit
2b8adb3a83
1 changed files with 5 additions and 0 deletions
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue