Skip to content

Provide a way to flush compression stream on demand #3599

Closed
@mtharrison

Description

@mtharrison

It's useful to be able to tell the payload compression stream to flush its content, for example when wanting the browser to render the HTML document <head> and download the associated resources while you're still generating or writing the document body.

Express's compression middleware achieves this by offering a res.flush() method. I think something similar would be useful in hapi for better control of streaming compressed content.

Streaming compressed payload with hapi

hapi

Streaming compressed payload with express+compression

express

Metadata

Metadata

Assignees

Labels

featureNew functionality or improvement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions