Page MenuHomePhabricator

D11145.diff
No OneTemporary

D11145.diff

diff --git a/support/aphlict/server/aphlict_server.js b/support/aphlict/server/aphlict_server.js
--- a/support/aphlict/server/aphlict_server.js
+++ b/support/aphlict/server/aphlict_server.js
@@ -226,26 +226,19 @@
response.end();
}
} else if (request.url == '/status/') {
- request.on('data', function() {
- // 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),
- 'clients.active': clients.getActiveListenerCount(),
- 'clients.total': clients.getTotalListenerCount(),
- 'messages.in': messages_in,
- 'messages.out': messages_out,
- 'log': config.log,
- 'version': 6
- };
-
- response.writeHead(200, {'Content-Type': 'application/json'});
- response.write(JSON.stringify(status));
- response.end();
- });
+ var status = {
+ 'uptime': (new Date().getTime() - start_time),
+ 'clients.active': clients.getActiveListenerCount(),
+ 'clients.total': clients.getTotalListenerCount(),
+ 'messages.in': messages_in,
+ 'messages.out': messages_out,
+ 'log': config.log,
+ 'version': 6
+ };
+
+ response.writeHead(200, {'Content-Type': 'application/json'});
+ response.write(JSON.stringify(status));
+ response.end();
} else {
response.statusCode = 404;
response.write('404 Not Found\n');

File Metadata

Mime Type
text/plain
Expires
Sat, Oct 26, 6:53 AM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6750178
Default Alt Text
D11145.diff (1 KB)

Event Timeline