-
Notifications
You must be signed in to change notification settings - Fork 129
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
Handling HEAD requests #70
Comments
jprobinson
pushed a commit
that referenced
this issue
Aug 14, 2018
#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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now there's not a way to respond to a HEAD request with the correct gzip headers because the headers aren't added until Write and inside the Write a writer is initialized and upon Close the gzip headers are written and you cannot have a body in a HEAD response.
The text was updated successfully, but these errors were encountered: