From 141ba0088ea80cca9d14fa9adaf5f9ca5a8b6d8a Mon Sep 17 00:00:00 2001 From: Sam Frances Date: Thu, 18 May 2017 10:08:54 +0100 Subject: [PATCH] Change logging of URL to be compatible with both old and new versions of ws --- other/js/websockify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/other/js/websockify.js b/other/js/websockify.js index a29ad22..f617a1f 100755 --- a/other/js/websockify.js +++ b/other/js/websockify.js @@ -28,7 +28,7 @@ var argv = require('optimist').argv, // Handle new WebSocket client new_client = function(client, req) { var clientAddr = client._socket.remoteAddress, log; - console.log(req.url); + console.log(req ? req.url : client.upgradeReq.url); log = function (msg) { console.log(' ' + clientAddr + ': '+ msg); };