Function URL with Response Streaming does not support Content-Encoding
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
The issue names no repository files or tests. Start by reproducing the provided Node.js streamifyResponse example and inspect the response received through the Function URL; done means the gzip-compressed stream remains compressed and the Content-Encoding header is preserved.
Written by the indexing model from the issue text.
Description
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:
- Dominant language
- TypeScript
- Stars
- 224
- Forks
- 60
- Avg merge
- 26m
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws/aws-lambda-nodejs-runtime-interface-client
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
aws/aws-lambda-nodejs-runtime-interface-client#198 · 3 comments · 6 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
aws/aws-lambda-nodejs-runtime-interface-client#195 · 12 reactions ·
-
bug
aws/aws-lambda-nodejs-runtime-interface-client#170 · 15 comments · 6 reactions · 1 assignee ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
aws/aws-lambda-nodejs-runtime-interface-client#159 · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
aws/aws-lambda-nodejs-runtime-interface-client#145 · 1 comment · 6 reactions ·
All issues in aws/aws-lambda-nodejs-runtime-interface-client
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·