val req = sttp.head(uri"https://www.google.com")
implicit val backend = HttpURLConnectionBackend()
req.send()
You'll see this failure:
java.io.EOFException
at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:268)
at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:258)
at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:164)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:79)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:91)
at com.softwaremill.sttp.HttpURLConnectionBackend.wrapInput(HttpURLConnectionBackend.scala:283)
Apparently the GZIPInputStream is created despite the lack of a response body, immediately causing a failure.
It would be great if there was a way to stop sttp from creating the GZIPInputStream so I could ignore the body.
Try this out with 1.5.19:
You'll see this failure:
Apparently the GZIPInputStream is created despite the lack of a response body, immediately causing a failure.
It would be great if there was a way to stop sttp from creating the GZIPInputStream so I could ignore the body.