Skip to content

Commit

Permalink
Don't hang on /status/ for newer Node
Browse files Browse the repository at this point in the history
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
  • Loading branch information
epriestley committed Apr 11, 2013
1 parent 7b9b872 commit 2b8adb3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions support/aphlict/server/aphlict_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 2b8adb3

Please sign in to comment.