diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-06-18 19:16:41 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-06-18 19:16:41 +0900 |
| commit | 80d8af84ddb5c2e72cc253440d81d3353ae91cdf (patch) | |
| tree | 09101b4b6d91773d4378397127752009591b4055 /src/misc | |
| parent | Merge branch 'develop' (diff) | |
| parent | 11.22.0 (diff) | |
| download | misskey-80d8af84ddb5c2e72cc253440d81d3353ae91cdf.tar.gz misskey-80d8af84ddb5c2e72cc253440d81d3353ae91cdf.tar.bz2 misskey-80d8af84ddb5c2e72cc253440d81d3353ae91cdf.zip | |
Merge branch 'develop'
Diffstat (limited to 'src/misc')
| -rw-r--r-- | src/misc/convert-host.ts | 1 | ||||
| -rw-r--r-- | src/misc/donwload-url.ts | 4 |
2 files changed, 1 insertions, 4 deletions
diff --git a/src/misc/convert-host.ts b/src/misc/convert-host.ts index a5fb15c66f..ad52e12588 100644 --- a/src/misc/convert-host.ts +++ b/src/misc/convert-host.ts @@ -1,6 +1,5 @@ import config from '../config'; import { toASCII } from 'punycode'; -import { URL } from 'url'; export function getFullApAccount(username: string, host: string | null) { return host ? `${username}@${toPuny(host)}` : `${username}@${toPuny(config.host)}`; diff --git a/src/misc/donwload-url.ts b/src/misc/donwload-url.ts index 167e01fdd1..e2f10c0e40 100644 --- a/src/misc/donwload-url.ts +++ b/src/misc/donwload-url.ts @@ -25,10 +25,8 @@ export async function downloadUrl(url: string, path: string) { rej(error); }); - const requestUrl = new URL(url).pathname.match(/[^\u0021-\u00ff]/) ? encodeURI(url) : url; - const req = request({ - url: requestUrl, + url: new URL(url).href, // https://github.com/syuilo/misskey/issues/2637 proxy: config.proxy, timeout: 10 * 1000, headers: { |