Skip to content

Commit

Permalink
Fixed the special character problem with a more generic solution
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienCastex committed Nov 1, 2017
1 parent fd032c2 commit 6d54bd0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/server/v2/commands/Propfind.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function parseRequestBody(ctx, data) {
}
}
function encode(url) {
return url.replace(/ /img, '%20');
return encodeURI(url);
}
function propstatStatus(status) {
return 'HTTP/1.1 ' + status + ' ' + http.STATUS_CODES[status];
Expand Down
2 changes: 1 addition & 1 deletion src/server/v2/commands/Propfind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function parseRequestBody(ctx : HTTPRequestContext, data : Buffer) : PropertyRul

function encode(url : string)
{
return url.replace(/ /img, '%20');
return encodeURI(url);
}

function propstatStatus(status : number)
Expand Down

0 comments on commit 6d54bd0

Please sign in to comment.