dsh-folia 4.26.0-pre.59 → 4.26.0-pre.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1939,7 +1939,8 @@ async function handleMicTest(req, res) {
1939
1939
  res.setHeader('Content-Type', 'audio/wav');
1940
1940
  res.setHeader('Content-Length', String(bytes.length));
1941
1941
  res.setHeader('Cache-Control', 'no-store');
1942
- res.setHeader('X-Folia-Mic-Device', String(result.device || ''));
1942
+ // 中文设备名不能直接进 HTTP 头(Node 会报 Invalid character in header)⇒ URL 编码
1943
+ res.setHeader('X-Folia-Mic-Device', encodeURIComponent(String(result.device || '')));
1943
1944
  res.setHeader('X-Folia-Mic-Rms', String(result.audioRms == null ? '' : result.audioRms));
1944
1945
  res.setHeader('X-Folia-Mic-Db', String(result.audioDb == null ? '' : result.audioDb));
1945
1946
  res.setHeader('X-Folia-Mic-Bytes', String(result.bytes || bytes.length));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-folia",
3
3
  "displayName": "Folia · 壁纸引擎与桌宠",
4
- "version": "4.26.0-pre.59",
4
+ "version": "4.26.0-pre.60",
5
5
  "description": "DSH 壁纸引擎:本机 WE 壁纸实时渲染,视频/网页/开机动画/桌宠皮肤,一键拉取在线素材。",
6
6
  "type": "module",
7
7
  "engines": {