@maiyunnet/kebab 9.13.1 → 9.13.2

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.
package/doc/kebab-rag.md CHANGED
@@ -1360,7 +1360,7 @@ index/variables/VER.md
1360
1360
 
1361
1361
  # Variable: VER
1362
1362
 
1363
- > `const` **VER**: `"9.13.1"` = `'9.13.1'`
1363
+ > `const` **VER**: `"9.13.2"` = `'9.13.2'`
1364
1364
 
1365
1365
  Defined in: [index.ts:10](https://github.com/maiyunnet/kebab/blob/master/index.ts#L10)
1366
1366
 
@@ -26390,7 +26390,7 @@ sys/route/functions/getFormData.md
26390
26390
 
26391
26391
  > **getFormData**(`req`, `events?`, `limits?`): `Promise`\<`false` \| \{ `files`: `Record`\<`string`, [`IPostFile`](../../../index/interfaces/IPostFile.md) \| [`IPostFile`](../../../index/interfaces/IPostFile.md)[]\>; `post`: `Record`\<`string`, [`Json`](../../../index/type-aliases/Json.md)\>; \}\>
26392
26392
 
26393
- Defined in: [sys/route.ts:967](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L967)
26393
+ Defined in: [sys/route.ts:970](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L970)
26394
26394
 
26395
26395
  获取 formdata 的 post
26396
26396
 
@@ -26457,7 +26457,7 @@ sys/route/functions/getPost.md
26457
26457
 
26458
26458
  > **getPost**(`req`): `Promise`\<\{ `input`: `string`; `post`: `Record`\<`string`, `any`\>; `raw`: `Record`\<`string`, `any`\>; \}\>
26459
26459
 
26460
- Defined in: [sys/route.ts:881](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L881)
26460
+ Defined in: [sys/route.ts:884](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L884)
26461
26461
 
26462
26462
  获取 post 对象(通常已自动获取),如果是文件上传(formdata)的情况则不获取
26463
26463
 
@@ -26573,7 +26573,7 @@ sys/route/functions/unlinkUploadFiles.md
26573
26573
 
26574
26574
  > **unlinkUploadFiles**(`cctr`): `Promise`\<`void`\>
26575
26575
 
26576
- Defined in: [sys/route.ts:840](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L840)
26576
+ Defined in: [sys/route.ts:843](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L843)
26577
26577
 
26578
26578
  删除本次请求所有已上传的临时文件
26579
26579
 
@@ -26602,7 +26602,7 @@ sys/route/functions/waitCtr.md
26602
26602
 
26603
26603
  > **waitCtr**(`cctr`): `Promise`\<`void`\>
26604
26604
 
26605
- Defined in: [sys/route.ts:860](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L860)
26605
+ Defined in: [sys/route.ts:863](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L863)
26606
26606
 
26607
26607
  等待异步任务结束,并删除临时文件,如果结束后还有事务没关闭,则会在本函数中打印控制台并且写入 log 文件
26608
26608
  此时其实已经给客户端返回了,此处等待不消耗客户端的等待时间
package/index.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * --- 本文件用来定义每个目录实体地址的常量 ---
6
6
  */
7
7
  /** --- 当前系统版本号 --- */
8
- export declare const VER = "9.13.1";
8
+ export declare const VER = "9.13.2";
9
9
  /** --- 框架根目录,以 / 结尾 --- */
10
10
  export declare const ROOT_PATH: string;
11
11
  /** --- 框架的 LIB,以 / 结尾 --- */
package/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
  * --- 本文件用来定义每个目录实体地址的常量 ---
7
7
  */
8
8
  /** --- 当前系统版本号 --- */
9
- export const VER = '9.13.1';
9
+ export const VER = '9.13.2';
10
10
  // --- 服务端用的路径 ---
11
11
  const imu = decodeURIComponent(import.meta.url).replace('file://', '').replace(/^\/(\w:)/, '$1');
12
12
  /** --- /xxx/xxx --- */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maiyunnet/kebab",
3
- "version": "9.13.1",
3
+ "version": "9.13.2",
4
4
  "description": "Simple, easy-to-use, and fully-featured Node.js framework that is ready-to-use out of the box.",
5
5
  "type": "module",
6
6
  "keywords": [
package/sys/route.js CHANGED
@@ -619,7 +619,10 @@ export async function run(data) {
619
619
  }
620
620
  compress = lZlib.createCompress(data.req.headers['accept-encoding'] ?? '');
621
621
  if (compress) {
622
+ // --- Node.js 自动设置 transfer-encoding: chunked ---
622
623
  data.res.setHeader('content-encoding', compress.type);
624
+ // --- 压缩后大小变化,移除 content-length 避免与实际大小不匹配 ---
625
+ data.res.removeHeader('content-length');
623
626
  }
624
627
  lCore.writeHead(data.res, httpCode);
625
628
  }