Page MenuHomePhabricator

D18411.diff
No OneTemporary

D18411.diff

diff --git a/support/aphlict/server/lib/AphlictClientServer.js b/support/aphlict/server/lib/AphlictClientServer.js
--- a/support/aphlict/server/lib/AphlictClientServer.js
+++ b/support/aphlict/server/lib/AphlictClientServer.js
@@ -92,8 +92,14 @@
var server = this._server.listen.apply(this._server, arguments);
var wss = new WebSocket.Server({server: server});
- wss.on('connection', function(ws) {
- var path = url.parse(ws.upgradeReq.url).pathname;
+ // This function checks for upgradeReq which is only available in
+ // ws2 by default, not ws3. See T12755 for more information.
+ wss.on('connection', function(ws, request) {
+ if ('upgradeReq' in ws) {
+ request = ws.upgradeReq;
+ }
+
+ var path = url.parse(request.url).pathname;
var instance = self._parseInstanceFromPath(path);
var listener = self.getListenerList(instance).addListener(ws);

File Metadata

Mime Type
text/plain
Expires
Wed, Mar 5, 9:38 PM (11 h, 17 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7227464
Default Alt Text
D18411.diff (943 B)

Event Timeline