This commit is contained in:
syuilo 2019-06-18 14:04:41 +09:00
parent 1a984de8e8
commit 7096c0ca49
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
1 changed files with 1 additions and 0 deletions

View File

@ -25,6 +25,7 @@ export async function downloadUrl(url: string, path: string) {
rej(error);
});
// 多バイト文字が含まれてそうだったらリクエスト前にURIエンコードする
const requestUrl = new URL(url).pathname.match(/[^\u0021-\u00ff]/) ? encodeURI(url) : url;
const req = request({