-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request add body throws EOFException #803
Comments
Can you give me a real URL to test against? If you'd like to share privately I'm |
I think it is a https problem . When I use the commit 'f4c83e8'. It works. But it does not have the class 'Call' I have send you the sample class. |
Works for me.
|
@Zhouxuefei does the above code work for you on-device? |
@swankjesse No. I have debug it. It will take so many time when ' call.execute(); ' run. And then throws a EOFException which is hardcode at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:154) |
@swankjesse I have send you my sample code such as a Activity in Android. If I check out the commit 'f4c83e8' that using okio 0.7 ,it works . I'm sorry, I don't have enough time to fork it. and can you use JDK 6 to test it, if it does not take you a lot of time. |
I'll take a look! |
@swankjesse I have test it, twitter throws EOFException, and facebook can return response.
|
@swankjesse the version 2.0.0-RC1 can work |
I am using and when I try to make a call to one of my servers on HTTPs that looks something like this HTTP https://..com/service/mobile/1.0/141022 I get
it does happen once in a while. But normally, the same calls I make to that URL work fine. Any thoughts? |
At first glance it looks like bad connection reuse, but that should be recovered from & retried automatically. Is this a POST request? |
Oh yes I noticed people had retry code square/retrofit#397 but not sure if that is the ideal way of handling it. Oh yes, this is a POST request for an RPC call. Cheers! |
I have the same problem. please fix it.
|
Having the same issue when using POST |
Tracking the EOFException here: #1114 |
This issue occurred daily,kill it |
When the class com.squareup.okhttp.Call has been added.
when I called method call.execute();
the example throws a java.io.EOFException
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:154)
String json = bowlingJson();
Request.Body body = Request.Body.create(MediaType.parse("application/json"), json);
Request request = new Request.Builder()
.url("https://xxxxxxxxx/api/1/user/phone_test")
.method("POST",body)
.build();
Call call = client.newCall(request);
Response response = call.execute();
But the earlier version of the example, Response response = client.execute(request);
It works.
In the latest version, the method " execute(Request request)" have goon.
The text was updated successfully, but these errors were encountered: