We have an XML API service which splits reply XML data into chunks if it is larger then certain amount of bytes. Here is the sample piece of the reply:
HTTP/1.1 200 OK Server: nginx/0.6.35 Date: Wed, 20 Jan 2010 14:53:27 GMT Content-Type: text/xml;charset=UTF-8 Transfer-Encoding: chunked Connection: keep-alive X-Powered-By: Servlet 2.4; JBoss-4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)/Tomcat-5.5 Connection: close 1f0d <?xml version='1.0' encoding='UTF-8'?> <root> [...] <Label><![CDATA[Some character data br 2000 oken in the middle of the string]]></Label> [...] <root> 0 The problem is when this XML is retrieved via httpResponse.getEntity().getContent() I expect all chunks to be transformed into single XML with no service information (I'm talking about some strange 2000 number appearing in the middle of the string) In fact returned content is not always correctly parsed and contains such service information, which in turn makes my XML parser throw an exception httpResponse.getEntity().isChunked() always retrieves "true" Can anyone advice on what am I doing wrong or otherwise provide information how to workaround such issue? Thanks, Roman -- View this message in context: http://old.nabble.com/HttpClient-does-not-seem-to-correctly-handle-chunked-response-tp27244426p27244426.html Sent from the HttpClient-User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org