Skip to content

Gzip compression is skipped when content-length is unknown #2869

@nlindley

Description

@nlindley

I ran across an issue that when replying with a stream of unknown length, gzip compression is skipped. It looks like the issue stems from assuming the content-length is 0 if the header has not been set.

https://github.com/hapijs/hapi/blob/master/lib/transmit.js#L183

As far as I can tell, the check for length first appeared in this commit.

96083e3#diff-1b255634e333bd5cd92f5b48c61e72cbR224

Metadata

Metadata

Assignees

Labels

bugBug or defect

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions