From: Darren <darren@darrenwhitlen.com>
Date: Thu, 11 Sep 2014 20:06:25 +0000 (+0100)
Subject: HTTP handler removing any query string before comparisons
X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f5114ea7efa7633a68f56e8e70151861a69530ce;p=KiwiIRC.git

HTTP handler removing any query string before comparisons
---

diff --git a/server/httphandler.js b/server/httphandler.js
index c55dc57..bb56b90 100644
--- a/server/httphandler.js
+++ b/server/httphandler.js
@@ -32,8 +32,8 @@ HttpHandler.prototype.serve = function (request, response) {
         base_path = base_path.substr(0, base_path.length - 1);
     }
 
-    // Normalise the URL to compare against the base_path
-    base_check = request.url;
+    // Normalise the URL + remove query strings to compare against the base_path
+    base_check = request.url.split('?')[0];
     if (base_check.substr(base_check.length - 1) !== '/') {
         base_check += '/';
     }