{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/869","labels_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/869/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/869/comments","events_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/869/events","html_url":"https://github.com/chrsmith/google-api-java-client/issues/869","id":59528413,"number":869,"title":"EOFException when performing request","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-02T18:59:27Z","updated_at":"2015-03-02T18:59:27Z","closed_at":"2015-03-02T18:59:27Z","body":"```\nVersion of google-api-java-client : google-http-client-1.17.0-rc\n\n\nJava environment: Android 4.3\n\n\nDescribe the problem.\n\nDuring certain requests I receive the following:\n\n04-09 12:52:31.937      I/ApiClient REQUEST: POST : /api/stream/start body: {\n    \"mediaType\" : {\n    \"parameters\" : {\n    \"charset\" : \"UTF-8\"\n    },\n    \"subType\" : \"x-www-form-urlencoded\",\n    \"type\" : \"application\",\n    \"charsetParameter\" : \"java.nio.charset.CharsetICU[UTF-8]\"\n    },\n    \"data\" : {\n    \"uuid\" : \"6ecd6zd8-0452-4ff9-96be-341d8168d7a9\",\n    \"private\" : false,\n    \"title\" : \"04/09/2014 12:52 PM\",\n    \"description\" : \"Example Description\",\n    \"extra_info\" : \"{'foo': 'bar'}\"\n    },\n    \"length\" : 159,\n    \"type\" : \"application/x-www-form-urlencoded; charset=UTF-8\"\n    }\n04-09 12:52:32.107      W/ApiClient Unhandled Error: java.io.EOFException \ncannot be cast to com.google.api.client.http.HttpResponseException. Stack trace \nfollows:\n04-09 12:52:32.107      W/System.err﹕ java.io.EOFException\n04-09 12:52:32.117      W/System.err﹕ at \nlibcore.io.Streams.readAsciiLine(Streams.java:203)\n04-09 12:52:32.117      W/System.err﹕ at \nlibcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:579)\n04-09 12:52:32.117      W/System.err﹕ at \nlibcore.net.http.HttpEngine.readResponse(HttpEngine.java:827)\n04-09 12:52:32.127      W/System.err﹕ at \nlibcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:28\n3)\n04-09 12:52:32.137      W/System.err﹕ at \nlibcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.jav\na:497)\n04-09 12:52:32.147      W/System.err﹕ at \nlibcore.net.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.j\nava:134)\n04-09 12:52:32.147      W/System.err﹕ at \ncom.google.api.client.http.javanet.NetHttpResponse.<init>(NetHttpResponse.java:3\n6)\n04-09 12:52:32.147      W/System.err﹕ at \ncom.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:94\n)\n04-09 12:52:32.147      W/System.err﹕ at \ncom.google.api.client.http.HttpRequest.execute(HttpRequest.java:965)\n04-09 12:52:32.157      W/System.err﹕ at \nio.kickflip.sdk.api.KickflipApiClient.request(KickflipApiClient.java:367)\n04-09 12:52:32.157      W/System.err﹕ at \nio.kickflip.sdk.api.KickflipApiClient.access$300(KickflipApiClient.java:43)\n04-09 12:52:32.157      W/System.err﹕ at \nio.kickflip.sdk.api.KickflipApiClient$3.onSuccess(KickflipApiClient.java:342)\n04-09 12:52:32.157      W/System.err﹕ at \nio.kickflip.sdk.api.OAuthClient$1.run(OAuthClient.java:103)\n04-09 12:52:32.157      W/System.err﹕ at java.lang.Thread.run(Thread.java:841)\n\nHow would you expect it to be fixed?\n\nGroup consensus on StackOverflow seems to suggest this is due to connection \nrecycling. Setting a property on the HttpUrlConnection may address this issue:\n\nsee \nhttp://stackoverflow.com/questions/15411213/android-httpsurlconnection-eofexcept\nion\n\n\n```\n\nOriginal issue reported on code.google.com by `davidpbr...@gmail.com` on 9 Apr 2014 at 8:02"},"comment":{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/comments/76781507","html_url":"https://github.com/chrsmith/google-api-java-client/issues/869#issuecomment-76781507","issue_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/869","id":76781507,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-03-02T18:59:27Z","updated_at":"2015-03-02T18:59:27Z","body":"```\nAppreciate the update.\n\nIf I read correctly, AndroidHttp.newCompatibleTransport() returns \nNetHttpTransport, not ApacheHttpTransport if the Android API version exceeds 9 \n(i.e 18 for Android 4.3).\n\npublic static HttpTransport newCompatibleTransport() {\n    return AndroidUtils.isMinimumSdkLevel(9) ? new NetHttpTransport() : new ApacheHttpTransport();\n  }\n\n[2] states:\n\nThere is no guarantee that Apache HTTP transport will continue to work in \nfuture SDKs. Therefore, this method uses {@link NetHttpTransport} for \nGingerbread or higher, and otherwise {@link ApacheHttpTransport}.\n\nTo be crystal clear on Google's recommendation: Avoid NetHttpTransport in all \ncases? Only where Android API < 9? Only where Android API < 18?\n```\n\nOriginal comment by `davidpbr...@gmail.com` on 13 Jan 2015 at 8:46"}}