@dahawa/hawa-cli-analysis 2.2.0 → 2.2.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.
@@ -122,11 +122,13 @@ function logAPI(fullLog){
122
122
  }
123
123
 
124
124
  function headersToObject(headers) {
125
- const obj = {};
126
- try {
127
- for (const [k, v] of headers.entries()) obj[k] = v;
128
- } catch {}
129
- return obj;
125
+ if (!headers) return {};
126
+
127
+ if (typeof headers.entries === "function") {
128
+ return Object.fromEntries(headers.entries());
129
+ }
130
+
131
+ return { ...headers };
130
132
  }
131
133
 
132
134
  const fastify = Fastify(
@@ -213,7 +215,7 @@ async function handel(request, reply, endpoint){
213
215
  }
214
216
  }
215
217
  //如果对 tools 修改了这里的长度肯定要变化的
216
- let requestHeaders = {...request.headers}
218
+ let requestHeaders = {...request.headers,"accept-encoding":"identity"}
217
219
  delete requestHeaders["content-length"]; //可能还有大小写问题
218
220
  //console.log(requestHeaders);
219
221
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dahawa/hawa-cli-analysis",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "main": "index",
5
5
  "bin": {
6
6
  "uclaude": "uclaude.js",