{"action":"opened","issue":{"url":"https://api.github.com/repos/square/okhttp/issues/1540","labels_url":"https://api.github.com/repos/square/okhttp/issues/1540/labels{/name}","comments_url":"https://api.github.com/repos/square/okhttp/issues/1540/comments","events_url":"https://api.github.com/repos/square/okhttp/issues/1540/events","html_url":"https://github.com/square/okhttp/issues/1540","id":65358986,"number":1540,"title":"ArrayIndexOutOfBoundsException reading from stream","user":{"login":"petershu","id":6394396,"avatar_url":"https://avatars.githubusercontent.com/u/6394396?v=3","gravatar_id":"","url":"https://api.github.com/users/petershu","html_url":"https://github.com/petershu","followers_url":"https://api.github.com/users/petershu/followers","following_url":"https://api.github.com/users/petershu/following{/other_user}","gists_url":"https://api.github.com/users/petershu/gists{/gist_id}","starred_url":"https://api.github.com/users/petershu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petershu/subscriptions","organizations_url":"https://api.github.com/users/petershu/orgs","repos_url":"https://api.github.com/users/petershu/repos","events_url":"https://api.github.com/users/petershu/events{/privacy}","received_events_url":"https://api.github.com/users/petershu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-31T03:52:09Z","updated_at":"2015-03-31T03:52:09Z","closed_at":null,"body":"Our crash logger is logging a lot of these ArrayIndexOutOfBoundsExceptions when trying to read GZIP data from the response body's byte stream:\r\n\r\n```\r\njava.lang.ArrayIndexOutOfBoundsException: size=0 offset=0 byteCount=1\r\n\tat okio.Util.checkOffsetAndCount(Util.java:29)\r\n\tat okio.Buffer.getByte(Buffer.java:294)\r\n\tat okio.RealBufferedSource.readHexadecimalUnsignedLong(RealBufferedSource.java:269)\r\n\tat com.squareup.okhttp.internal.http.HttpConnection$ChunkedSource.readChunkSize(HttpConnection.java:451)\r\n\tat com.squareup.okhttp.internal.http.HttpConnection$ChunkedSource.read(HttpConnection.java:432)\r\n\tat okio.RealBufferedSource$1.read(RealBufferedSource.java:338)\r\n\tat java.io.InputStream.read(InputStream.java:162)\r\n\tat java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:194)\r\n\tat java.util.zip.InflaterInputStream.read(InflaterInputStream.java:153)\r\n\tat java.util.zip.GZIPInputStream.read(GZIPInputStream.java:163)\r\n\tat java.io.FilterInputStream.read(FilterInputStream.java:118)\r\n```\r\n\r\nAny suggestions?"}}