Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13970724
D11145.id26757.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D11145.id26757.diff
View Options
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': 'text/plain'});
- 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': 'text/plain'});
+ response.write(JSON.stringify(status));
+ response.end();
} else {
response.statusCode = 404;
response.write('404 Not Found\n');
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 18 2024, 9:32 AM (4 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6726139
Default Alt Text
D11145.id26757.diff (1 KB)
Attached To
Mode
D11145: Minor improvements for handling of `/status/` for Aphlict
Attached
Detach File
Event Timeline
Log In to Comment