hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpravn <dpr...@gmail.com>
Subject Re: HttpClient does not seem to correctly handle chunked response
Date Thu, 15 Jul 2010 12:45:45 GMT

Hi Roman,

I am facing the same situation with http client. For some reason JBoss 4.2.2
with Tomcat 5.5 doesn't send proper chunked response.

Can you please let me know whether your issue has been resolved? Is it a bug
in Tomcat server or httpclient?

Any help would be quite useful.

Thanks
Praveen



RomanY wrote:
> 
> 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-tp27244426p29172510.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message