{"action":"created","issue":{"url":"https://api.github.com/repos/square/okio/issues/125","labels_url":"https://api.github.com/repos/square/okio/issues/125/labels{/name}","comments_url":"https://api.github.com/repos/square/okio/issues/125/comments","events_url":"https://api.github.com/repos/square/okio/issues/125/events","html_url":"https://github.com/square/okio/issues/125","id":60500520,"number":125,"title":"EOFException when okio tries to log a body on a 204 http response","user":{"login":"deionalims","id":1353452,"avatar_url":"https://avatars.githubusercontent.com/u/1353452?v=3","gravatar_id":"","url":"https://api.github.com/users/deionalims","html_url":"https://github.com/deionalims","followers_url":"https://api.github.com/users/deionalims/followers","following_url":"https://api.github.com/users/deionalims/following{/other_user}","gists_url":"https://api.github.com/users/deionalims/gists{/gist_id}","starred_url":"https://api.github.com/users/deionalims/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deionalims/subscriptions","organizations_url":"https://api.github.com/users/deionalims/orgs","repos_url":"https://api.github.com/users/deionalims/repos","events_url":"https://api.github.com/users/deionalims/events{/privacy}","received_events_url":"https://api.github.com/users/deionalims/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-10T13:40:48Z","updated_at":"2015-03-10T13:45:35Z","closed_at":"2015-03-10T13:42:18Z","body":"Hello.\r\n\r\nI have this problem that I've been trying to fix for days. Okio tries to log a body on a 204 http response and it ends up in a EOFException. \r\nI'm out of ideas. Any help would be really appreciated.\r\n\r\n````\r\n\r\n<--- HTTP 204 https://some.url/\r\nServer: nginx\r\nDate: Tue, 10 Mar 2015 12:38:53 GMT\r\nContent-Type: text/html\r\nConnection: keep-alive\r\nCache-Control: private, must-revalidate\r\npragma: no-cache\r\nexpires: -1\r\nSet-Cookie: flash_bag=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; httponly\r\nX-Varnish: 391643738\r\nOkHttp-Selected-Protocol: http/1.1\r\nOkHttp-Sent-Millis: 1425991132134\r\nOkHttp-Received-Millis: 1425991132581\r\n\r\n9098-9332/com.comuto D/Retrofit﹕ java.io.EOFException\r\n            at okio.RealBufferedSource.require(RealBufferedSource.java:64)\r\n            at okio.GzipSource.consumeHeader(GzipSource.java:114)\r\n            at okio.GzipSource.read(GzipSource.java:73)\r\n            at okio.RealBufferedSource$1.read(RealBufferedSource.java:298)\r\n            at retrofit.Utils.streamToBytes(Utils.java:43)\r\n            at retrofit.Utils.readBodyToBytesIfNecessary(Utils.java:81)\r\n            at retrofit.RestAdapter.logAndReplaceResponse(RestAdapter.java:483)\r\n            at retrofit.RestAdapter.access$500(RestAdapter.java:107)\r\n            at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:338)\r\n````"},"comment":{"url":"https://api.github.com/repos/square/okio/issues/comments/78055087","html_url":"https://github.com/square/okio/issues/125#issuecomment-78055087","issue_url":"https://api.github.com/repos/square/okio/issues/125","id":78055087,"user":{"login":"deionalims","id":1353452,"avatar_url":"https://avatars.githubusercontent.com/u/1353452?v=3","gravatar_id":"","url":"https://api.github.com/users/deionalims","html_url":"https://github.com/deionalims","followers_url":"https://api.github.com/users/deionalims/followers","following_url":"https://api.github.com/users/deionalims/following{/other_user}","gists_url":"https://api.github.com/users/deionalims/gists{/gist_id}","starred_url":"https://api.github.com/users/deionalims/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deionalims/subscriptions","organizations_url":"https://api.github.com/users/deionalims/orgs","repos_url":"https://api.github.com/users/deionalims/repos","events_url":"https://api.github.com/users/deionalims/events{/privacy}","received_events_url":"https://api.github.com/users/deionalims/received_events","type":"User","site_admin":false},"created_at":"2015-03-10T13:45:35Z","updated_at":"2015-03-10T13:45:35Z","body":"This is your comment from the bug filled on Retrofit:\r\n\"If there is a problem with a library (which I'm doubtful of) it would be in OkHttp or potentially even in Okio.\"\r\nReading the stacktrace I assumed this was okio. That's why I also filled a bug here. "}}