Merge pull request #393 from seegno/enhancement/add-support-for-node-0-11-15

Fix url.format taking into account path on node@0.11.15
This commit is contained in:
Yiyu He 2015-01-26 02:19:29 +08:00
commit ceacafeb81

View file

@ -117,6 +117,8 @@ module.exports = {
set path(path) { set path(path) {
var url = parse(this.req); var url = parse(this.req);
url.pathname = path; url.pathname = path;
url.path = null;
this.url = stringify(url); this.url = stringify(url);
}, },
@ -167,6 +169,8 @@ module.exports = {
set querystring(str) { set querystring(str) {
var url = parse(this.req); var url = parse(this.req);
url.search = str; url.search = str;
url.path = null;
this.url = stringify(url); this.url = stringify(url);
}, },