forked from FoundKeyGang/FoundKey
Fix #2637
This commit is contained in:
parent
7096c0ca49
commit
736fdabc1d
1 changed files with 1 additions and 4 deletions
|
@ -25,11 +25,8 @@ export async function downloadUrl(url: string, path: string) {
|
||||||
rej(error);
|
rej(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 多バイト文字が含まれてそうだったらリクエスト前にURIエンコードする
|
|
||||||
const requestUrl = new URL(url).pathname.match(/[^\u0021-\u00ff]/) ? encodeURI(url) : url;
|
|
||||||
|
|
||||||
const req = request({
|
const req = request({
|
||||||
url: requestUrl,
|
url: new URL(url).href, // https://github.com/syuilo/misskey/issues/2637
|
||||||
proxy: config.proxy,
|
proxy: config.proxy,
|
||||||
timeout: 10 * 1000,
|
timeout: 10 * 1000,
|
||||||
headers: {
|
headers: {
|
||||||
|
|
Loading…
Reference in a new issue