Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check Content-Length against minSize and passthrough writes if no gzip #71

Merged
merged 1 commit into from
Aug 14, 2018
Merged

Commits on Aug 8, 2018

  1. Check Content-Length against minSize and passthrough writes if no gzip

    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
    jameshartig committed Aug 8, 2018
    Configuration menu
    Copy the full SHA
    76e7c77 View commit details
    Browse the repository at this point in the history