HTTPClient(commons-io-1.3.2) - 无效的头:charset = iso-8859-1

时间:2011-02-28 16:07:32

标签: android httpclient

我正在制作HTTPGet请求(Android应用)并收到此错误。 它是什么意思,我该如何解决? 谢谢!

E/Client  ( 3778): Caused by: org.apache.http.ProtocolException: Invalid header: charset=iso-8859-1
E/Client  ( 3778):      at org.apache.http.impl.io.AbstractMessageParser.parseHeaders(AbstractMessageParser.java:162)
E/Client  ( 3778):      at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:178)
E/Client  ( 3778):      at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:179)
E/Client  ( 3778):      at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:235)
E/Client  ( 3778):      at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:259)
E/Client  ( 3778):      at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:279)
E/Client  ( 3778):      at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:121)
E/Client  ( 3778):      at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:421)
E/Client  ( 3778):      at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
E/Client  ( 3778):      ... 6 more

1 个答案:

答案 0 :(得分:0)

我没有看到charset列为请求标头,列出了Accept-Charset

请参阅HTTP Request headers