-
Notifications
You must be signed in to change notification settings - Fork 47
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
HEAD request must not look for a body #114
Comments
Well that's a bug. Duplicate #102. This could be easily fixed if Hm. AfC |
This works when you know there is no body, no matter what the headers say (HEAD requests, aesiniath#114) This also works when the handler consumes whatever part of the body you actually want to use, and then you close the connection afterwards (no reusing for pipelining!) Sometimes this is a lot faster than using pipelining if you can, for example, skip a many GB download (aesiniath#113)
This works when you know there is no body, no matter what the headers say (HEAD requests, aesiniath#114) This also works when the handler consumes whatever part of the body you actually want to use, and then you close the connection afterwards (no reusing for pipelining!) Sometimes this is a lot faster than using pipelining if you can, for example, skip a many GB download (aesiniath#113)
This works when you know there is no body, no matter what the headers say (HEAD requests, aesiniath#114) This also works when the handler consumes whatever part of the body you actually want to use, and then you close the connection afterwards (no reusing for pipelining!) Sometimes this is a lot faster than using pipelining if you can, for example, skip a many GB download (aesiniath#113)
A
HEAD
request may contain aContent-Length
with a number that would be the size of aGET
response, but no actual body to read. It may also contain no such header, but not close the connection when done (web.archive.org
does this, for example).In general, when issuing a request of type
HEAD
the client should not even try to read a body and should just return an emptyInputStream
to the handler. Currently the client often hangs when handling such a request.I'm trying to work around this locally, but since none of the internal modules are exported it's very hard to do, even by copying a lot of the internal code out into my application since I don't have access to data constructors I cannot reimplement
receiveResponse
for example.The text was updated successfully, but these errors were encountered: