http请求报错

使用:HttpClient httpClient = new HttpClient();
和java自带的http都会包奇怪的错误

org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) at com.wap.sohu.mpaper.fetch.template.SyncSearchTemplate.sendSApi(SyncSearchTemplate.java:111) at com.wap.sohu.mpaper.fetch.template.SyncSearchTemplate.SyncSearchNews(SyncSearchTemplate.java:176) at com.wap.sohu.mpaper.fetch.timer.test.TestSearch.main(TestSearch.java:12)org.apache.commons.httpclient.NoHttpResponseException: The server 10.10.76.38 failed to respond at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1976) at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735) at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) at com.wap.sohu.mpaper.fetch.template.SyncSearchTemplate.sendSApi(SyncSearchTemplate.java:111) at com.wap.sohu.mpaper.fetch.template.SyncSearchTemplate.SyncSearchNews(SyncSearchTemplate.java:176) at com.wap.sohu.mpaper.fetch.timer.test.TestSearch.main(TestSearch.java:12)12-10 19:44:55 INFO com.wap.sohu.mpaper.fetch.template.SyncSearchTemplate - SyncSearchTemplate will break .du to http sapi has error!newsid:4401364

包类似这种错误
最后发现bug
1:使用了enconde 包被 reset
2: 传输的数据了太大了

你可能感兴趣的:(java)