Skip to content

Content-Encoding: gzip header should not be sent when HTTP 204 #489

@mtojek

Description

@mtojek

Hi,

nginx warns about empty responses (HTTP 204) with a Content-Encoding header set (based on user request header Accept-Encoding).

I propose to refactor a bit gzipResponseWriter to be sending mentioned header if only HTTP response body is not empty.

Will it be possible, what do you think @vishr ?

Best regards,
Marcin

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions