kong.unirest.UnirestParsingException: kong.unirest.UnirestException: java.io.EOFException
at kong.unirest.BaseResponse.setParsingException(BaseResponse.java:93)
at kong.unirest.BasicResponse.<init>(BasicResponse.java:48)
at kong.unirest.apache.BaseApacheClient.transformBody(BaseApacheClient.java:56)
at kong.unirest.apache.ApacheClient.request(ApacheClient.java:127)
at kong.unirest.BaseRequest.asObject(BaseRequest.java:249)
at io.cloudio.scale.kafka.rest.FlowrestTest.main(FlowrestTest.java:33)
Caused by: kong.unirest.UnirestException: java.io.EOFException
at kong.unirest.apache.ApacheResponse.getContentAsBytes(ApacheResponse.java:89)
at kong.unirest.apache.ApacheResponse.getContentAsString(ApacheResponse.java:107)
at kong.unirest.apache.ApacheResponse.getContentAsString(ApacheResponse.java:97)
at kong.unirest.ObjectResponse.readBody(ObjectResponse.java:57)
at kong.unirest.ObjectResponse.<init>(ObjectResponse.java:40)
at kong.unirest.BaseRequest.lambda$asObject$3(BaseRequest.java:249)
at kong.unirest.apache.BaseApacheClient.transformBody(BaseApacheClient.java:53)
... 3 more
Caused by: 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 kong.unirest.apache.ApacheResponse.getContentAsBytes(ApacheResponse.java:85)
... 9 more
Describe the bug Parsing error occurs when POST response is empty gzip content type
To Reproduce
Server
Client
Stack Trace
Expected behavior Parsing error should not occur
Environmental Data: