mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
core: 修复base64文件名中出现/会导致无法下载的问题
This commit is contained in:
1 parent
7371b0c83c
commit
36fef2cd20
16 files changed
+45
-40
No files matched your search
@@ -126,7 +126,7 @@ export async function serial<K extends keyof EventMap>(name: K, ...args: Paramet
|
||||
if (argv.showBus) logger.debug('serial: %s %o', name, args);
|
||||
const hooks = Array.from(_hooks[name] || []);
|
||||
for (const callback of hooks) {
|
||||
if (argv.busDetail) console.log(callback.toString());
|
||||
if (argv.busDetail) logger.debug(callback.toString());
|
||||
await callback.apply(this, args);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -443,9 +443,9 @@ export class Handler {
|
||||
res = router.url(name, args, { query });
|
||||
if (anchor) return `${res}#${anchor}`;
|
||||
} catch (e) {
|
||||
console.error(e.message);
|
||||
console.log(name, args);
|
||||
console.log(e.stack);
|
||||
logger.warn(e.message);
|
||||
logger.info('%s %o', name, args);
|
||||
logger.info('%s', e.stack);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@@ -790,8 +790,8 @@ export class ConnectionHandler {
|
||||
res = router.url(name, args, { query });
|
||||
if (anchor) return `${res}#${anchor}`;
|
||||
} catch (e) {
|
||||
console.error(e.message);
|
||||
console.log(name, args);
|
||||
logger.error(e.message);
|
||||
logger.info(name, args);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@@ -877,7 +877,7 @@ export function Connection(
|
||||
if (h.finish) await h.finish(args);
|
||||
});
|
||||
} catch (e) {
|
||||
logger.warn(e);
|
||||
logger.warn('%o', e);
|
||||
await h.onerror(e);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user