com.jimuwd.xian.registry-proxy 1.0.43 → 1.0.44
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/dist/index.js +2 -1
- package/package.json +1 -1
- package/src/index.ts +3 -2
package/dist/index.js
CHANGED
|
@@ -175,7 +175,8 @@ async function writeSuccessfulResponse(registryInfo, targetUrl, res, response, r
|
|
|
175
175
|
// 复制所有可能需要的头信息
|
|
176
176
|
const headersToCopy = [
|
|
177
177
|
'cache-control', 'etag', 'last-modified',
|
|
178
|
-
'content-encoding', 'content-length'
|
|
178
|
+
'content-encoding', 'content-length',
|
|
179
|
+
'transfer-encoding', "collection"
|
|
179
180
|
];
|
|
180
181
|
headersToCopy.forEach(header => {
|
|
181
182
|
const value = response.headers.get(header);
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -240,7 +240,8 @@ async function writeSuccessfulResponse(
|
|
|
240
240
|
// 复制所有可能需要的头信息
|
|
241
241
|
const headersToCopy = [
|
|
242
242
|
'cache-control', 'etag', 'last-modified',
|
|
243
|
-
'content-encoding', 'content-length'
|
|
243
|
+
'content-encoding', 'content-length',
|
|
244
|
+
'transfer-encoding', "collection"
|
|
244
245
|
];
|
|
245
246
|
|
|
246
247
|
headersToCopy.forEach(header => {
|
|
@@ -273,7 +274,7 @@ async function writeSuccessfulResponse(
|
|
|
273
274
|
if (!response.body) {
|
|
274
275
|
console.error(`Empty response body from ${targetUrl}`);
|
|
275
276
|
} else {
|
|
276
|
-
await pipeline(response.body, res).finally(()=>res.end());
|
|
277
|
+
await pipeline(response.body, res).finally(() => res.end());
|
|
277
278
|
}
|
|
278
279
|
}
|
|
279
280
|
} catch (err) {
|