Function URL with Response Streaming does not support Content-Encoding
還沒有人認領這個 Issue。
評估
研究方向
此 issue 未指出任何 repository 檔案或測試。首先重現所提供的 Node.js streamifyResponse 範例,並檢查透過 Function URL 接收到的 response;當 gzip 壓縮的 stream 維持壓縮狀態且 Content-Encoding header 獲得保留時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
If I compress my response using gzip and set a proper Content-Encoding response header, it appears like Function URL will decompress my response on-the-fly, remove the Content-Encoding header, and pass down the uncompressed response stream. This is wasteful and unnecessary.
const pipeline = require("util").promisify(require("stream").pipeline);
const { Readable } = require("stream");
const zlib = require('zlib');
exports.handler = awslambda.streamifyResponse(async (event,
responseStream, context) => {
responseStream = awslambda.HttpResponseStream.from(responseStream, {
statusCode: 200,
headers: {
'content-encoding': 'gzip',
'content-type': 'text/plain',
}
});
await pipeline(
Readable.from(zlib.gzipSync('hello world')),
responseStream,
);
});
See here - the response is uncompressed, with Content-Encoding header stripped:
- 主要語言
- TypeScript
- 星號
- 224
- 分支
- 60
- 平均合併
- 26 分鐘
- 30 天內合併 PR
- 2
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
aws/aws-lambda-nodejs-runtime-interface-client 的其他 Issue
-
難度 5/5 一週以上 新手友好度 20/100
aws/aws-lambda-nodejs-runtime-interface-client#198 · 6 則留言 · 6 個 reaction ·
-
難度 4/5 3-5 天 新手友好度 48/100
aws/aws-lambda-nodejs-runtime-interface-client#195 · 13 個 reaction ·
-
Upgrading to 4.0.0 appears to break lambdas using docker可能重新可做 @godcrampy 於 295 天前認領,目前沒有進行中的 PR。 未關閉bug
aws/aws-lambda-nodejs-runtime-interface-client#170 · 15 則留言 · 6 個 reaction · 已指派 1 人 ·
-
難度 2/5 1-3 小時 新手友好度 38/100
aws/aws-lambda-nodejs-runtime-interface-client#159 · 2 個 reaction ·
-
難度 4/5 3-5 天 新手友好度 42/100
aws/aws-lambda-nodejs-runtime-interface-client#145 · 1 則留言 · 6 個 reaction ·
查看 aws/aws-lambda-nodejs-runtime-interface-client 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 72/100
betagouv/mon-entreprise#4699 ·
維護者通常 3 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 82/100
jaegertracing/jaeger-ui#4547 · 3 則留言 ·
維護者通常 1 天內回覆
-
ai-driven-qa
難度 2/5 1-3 小時 新手友好度 84/100
linagora/twake-calendar-frontend#1467 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
need4deed-org/sdk#267 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 84/100
auth0/universal-login#414 ·
維護者通常 1 天內回覆