-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check Content-Length against minSize and passthrough writes if no gzip (
#71) Currently there's no way to generate a HEAD response with the correct headers as the GET unless you set the minSize as 0, but then gzip headers will be written in Close. Instead, allow a Write(nil) that will set the correct headers based on the Content-Length/Content-Type headers and only initialize a writer if there is a non-zero-length Write. If the Content-Length cannot be determined, you cannot generate the response because it cannot know if minSize would've been met. Additionally, if we determined that the request should not be compressed we should passthrough writes immediately rather than waiting until Close. Fixes #70 Fixes #64
- Loading branch information
1 parent
5032c88
commit c551b6c
Showing
2 changed files
with
149 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters