ChunkAggregator
object ChunkAggregator
Generic middleware to aggregate chunked response into memory.
This middleware wraps any function that may produce an Http response. Upon receiving a chunk-encoded response, the composed function will pull and assemble the full response into memory before emitting the whole response. It also removes the "Chunked encoding" headers, and may add a Content-Length header for the whole payload.
Reference: "Chunked Transfer Encoding", Section 4.1 of RFC 7230 https://datatracker.ietf.org/doc/html/rfc7230#section-4.1
- Source:
- ChunkAggregator.scala