From 6550e8cfa07aab1c410ebb8d5b0676d625f93ea3 Mon Sep 17 00:00:00 2001 From: Urban Hafner Date: Sun, 21 Jun 2009 16:28:23 +0200 Subject: [PATCH] Remove empty parts of the parsed URI. --- src/http.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/http.js b/src/http.js index 1f3ee39cc6..bef88bcbe3 100644 --- a/src/http.js +++ b/src/http.js @@ -66,7 +66,11 @@ node.http.parseUri = function (str) { } }); uri.toString = function () { return str; }; - + + for (var i = o.key.length - 1; i >= 0; i--){ + if (uri[o.key[i]] == "") delete uri[o.key[i]]; + }; + return uri; };