From d108926f4634fabe4b18c49ab0ab25a169dbd665 Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Thu, 22 Jan 2015 02:43:44 +0000 Subject: [PATCH] Fix url.format usage of path on node@0.11.15 node@0.11.15 was released with a patch that adds support for `path` to url.format (https://github.com/joyent/node/commit/d312b6d15c69cf4c438ed7d884e6396c481a57f6). However, this broke `npm install` for git+ssh urls and as such has been reverted on io.js, making it work like on node@0.11.14 again. https://github.com/iojs/io.js/commit/913addbff5481567262c387cef9594f809e4ef83 --- lib/request.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/request.js b/lib/request.js index d80ef30..8e82398 100644 --- a/lib/request.js +++ b/lib/request.js @@ -117,6 +117,8 @@ module.exports = { set path(path) { var url = parse(this.req); url.pathname = path; + url.path = null; + this.url = stringify(url); }, @@ -167,6 +169,8 @@ module.exports = { set querystring(str) { var url = parse(this.req); url.search = str; + url.path = null; + this.url = stringify(url); },