We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
HEAD
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
requests.head("http://httpbin.org/get", headers = Map("Accept-Encoding" -> "gzip"))
java.io.EOFException java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:268) java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:258) java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:164) java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:79) java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:91) requests.Requester.stream(Requester.scala:333) requests.Requester.apply(Requester.scala:110) ammonite.$sess.cmd0$Helper.<init>(cmd0.sc:2) ammonite.$sess.cmd0$.<init>(cmd0.sc:7) ammonite.$sess.cmd0$.<clinit>(cmd0.sc:-1)
I hit this in the wild while poking at the GitHub API:
requests.head("https://api.github.com/users/ryan-williams")
A work-around is to ask for a non-gzipped response:
requests.head( "https://api.github.com/users/ryan-williams", headers = Map("Accept-Encoding" -> "identity") // ✅ works )
The text was updated successfully, but these errors were encountered:
Disable body reading on head requests (#95)
c65a2be
Fixes #37 Review by @lolgab
java.net.HTTPUrlConnection
java.net.http.HttpClient
Successfully merging a pull request may close this issue.
I hit this in the wild while poking at the GitHub API:
requests.head("https://api.github.com/users/ryan-williams")
A work-around is to ask for a non-gzipped response:
The text was updated successfully, but these errors were encountered: