Skip to content

Commit

Permalink
Fixed the parsing of the url when it is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienCastex committed Nov 18, 2017
1 parent fc22c3b commit 205e28a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/server/v2/RequestContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ var RequestContext = (function () {
this.headers = new RequestContextHeaders(headers);
this.server = server;
uri = url.parse(uri).pathname;
uri = uri ? uri : '';
this.requested = {
uri: uri,
path: new Path_1.Path(uri)
Expand Down
1 change: 1 addition & 0 deletions src/server/v2/RequestContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export class RequestContext
this.server = server;

uri = url.parse(uri).pathname;
uri = uri ? uri : '';
this.requested = {
uri,
path: new Path(uri)
Expand Down

0 comments on commit 205e28a

Please sign in to comment.