aldenks
CDCloudflare Developers
•Created by aldenks on 5/5/2025 in #workers-help
How to stream responses and return a known content length?
An example of the relevant code. I am seeing the X-Content-Length header so I know it's hitting that branch but the Content-Length header is removed (following spec).
I do want to follow http spec. I'm wondering if there's a way for workers to send the data along without be buffering in memory and with a content length header? HTTP2+ not having transfer encoding chunked at all seems to suggest there might be a way?
2 replies