首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

Caused by: org.apache.http.ProtocolException: Content-Length header

2012-02-04 
httpclient4的问题。。请大家帮帮忙!很急!!!1httpclient 中 如果我手动设置Content-Length就会出现这样的错

httpclient4的问题。。请大家帮帮忙!很急!!!1
httpclient 中 如果我手动设置Content-Length就会出现
这样的错误这是为什么啊!!!请大家帮帮忙很急!!

Java code
org.apache.http.client.ClientProtocolException    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822)    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)    at com.li.util.SendRequest.sendPost(SendRequest.java:47)    at com.li.ndws.imple.ZhongGuanCun.reply(ZhongGuanCun.java:86)    at com.li.ndws.imple.ZhongGuanCun.main(ZhongGuanCun.java:124)Caused by: org.apache.http.ProtocolException: Content-Length header already present    at org.apache.http.protocol.RequestContent.process(RequestContent.java:67)    at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:108)    at org.apache.http.protocol.HttpRequestExecutor.preProcess(HttpRequestExecutor.java:174)    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:452)    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)    ... 5 more


[解决办法]

热点排行