From: Darren Date: Sun, 4 Sep 2011 12:34:04 +0000 (+0100) Subject: user-agent fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a5ba2101b5f2cabd552696883ef23e2b060ec97f;p=KiwiIRC.git user-agent fix --- diff --git a/node/app.js b/node/app.js index 6ef776b..670e110 100644 --- a/node/app.js +++ b/node/app.js @@ -486,7 +486,7 @@ this.httpHandler = function (request, response) { kiwi.fileServer.serve(request, response); }); } else if (uri.pathname === '/' || uri_parts[1] === 'client') { - useragent = (request.headers) ? request.headers['user-agent'] : ''; + useragent = (typeof request.headers === 'string') ? request.headers['user-agent'] : ''; if (useragent.match(/android/i) !== -1) { agent = 'android'; touchscreen = true;