Skip to content

Releases: seanmadden/Fuel

Fix issue #177

02 Jun 21:39
Compare
Choose a tag to compare
Fix issue #177 Pre-release
Pre-release
Stop trying to read http head response input streams.

This fixes issue #177 (https://github.com/kittinunf/Fuel/issues/177)

From RFC2619 (https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)

The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.
The metainformation contained in the HTTP headers in response to a HEAD request SHOULD be identical to the
information sent in response to a GET request. This method can be used for obtaining metainformation about
the entity implied by the request without transferring the entity-body itself. This method is often used for
testing hypertext links for validity, accessibility, and recent modification.

So, it is valid to return the Content-Encoding: gzip header, but we must not try to read the empty stream as a gzip stream.