summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Hafner <urban@bettong.net>2009-06-21 16:28:23 +0200
committerUrban Hafner <urban@bettong.net>2009-06-21 16:28:23 +0200
commit6550e8cfa07aab1c410ebb8d5b0676d625f93ea3 (patch)
tree7d52ba2103d65048414b1f0abcf4746103075609
parent3a44efea6915e93a4ae24634fffc0b9a6da8aebb (diff)
downloadnodejs-6550e8cfa07aab1c410ebb8d5b0676d625f93ea3.tar.gz
nodejs-6550e8cfa07aab1c410ebb8d5b0676d625f93ea3.tar.bz2
nodejs-6550e8cfa07aab1c410ebb8d5b0676d625f93ea3.zip
Remove empty parts of the parsed URI.
-rw-r--r--src/http.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/http.js b/src/http.js
index 1f3ee39cc..bef88bcbe 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;
};