我正在HTTP/GET
通过 SSL 连接的简单请求将一组 CSV 行下载到我的 android 设备。在我们切换到新服务器(Debian 6 -> Debian 7)之前,这就像一个魅力,这可能是服务器证书的问题,但我不这么认为,因为下载开始并在此异常之前解析了大约 700 篇文章被抛出.readLine()
:
(请注意,该下载已在 Android ICS (4.*) 上进行了测试,并且没有任何问题,它似乎只影响 Android <= 2.3。)
Read error: ssl=0x35e700: Failure in SSL library, usually a protocol error
javax.net.ssl.SSLProtocolException: Read error: ssl=0x35e700: Failure in SSL library, usually a protocol error
at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_read(Native Method)
at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:788)
at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:103)
at org.apache.http.impl.io.AbstractSessionInputBuffer.read(AbstractSessionInputBuffer.java:134)
at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:161)
at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:159)
at java.io.InputStreamReader.read(InputStreamReader.java:255)
at java.io.BufferedReader.fillBuf(BufferedReader.java:128)
at java.io.BufferedReader.readLine(BufferedReader.java:357)
at xx.xxxxx.services.ArticlesSync.doInBackground(ArticlesSync.java:155)
at xx.xxxxx.services.ArticlesSync.doInBackground(ArticlesSync.java:26)
at android.os.AsyncTask$2.call(AsyncTask.java:185)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
at java.lang.Thread.run(Thread.java:1019)
|
InputStream inputStream = response.getContent();
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
String currentLine = null;
SQLArticleManager articles = SQLArticleManager.createArticles();
while ((currentLine = bufferedReader.readLine()) != null)
{
if (!progressDialog.isShowing())
{
return ERROR_ABORTED;
}
String[] data = currentLine.split("`");
if (data.length == 4)
{
articles.addArticle(data[0], data[1], data[2], Float.parseFloat(data[3]));
}
rowsRead++;
publishProgress(createProgress((int) (rowsRead * 100 / rows), ""));
}
我在这里做错了吗?可能是由于某处超时吗?