From 3e171872164ca708422ee297786da575840de556 Mon Sep 17 00:00:00 2001 From: Sam Frances Date: Wed, 17 May 2017 15:37:07 +0100 Subject: [PATCH] Fix bug caused by upgrade to ws version 3 --- other/js/websockify.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/other/js/websockify.js b/other/js/websockify.js index 3d0a046..a29ad22 100755 --- a/other/js/websockify.js +++ b/other/js/websockify.js @@ -26,9 +26,9 @@ var argv = require('optimist').argv, // Handle new WebSocket client -new_client = function(client) { +new_client = function(client, req) { var clientAddr = client._socket.remoteAddress, log; - console.log(client.upgradeReq.url); + console.log(req.url); log = function (msg) { console.log(' ' + clientAddr + ': '+ msg); }; @@ -92,7 +92,7 @@ http_request = function (request, response) { var uri = url.parse(request.url).pathname , filename = path.join(argv.web, uri); - + fs.exists(filename, function(exists) { if(!exists) { return http_error(response, 404, "404 Not Found");