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:
commit
ceacafeb81
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue