On 03/12/2008, Mike Clark <[EMAIL PROTECTED]> wrote:
> > -----Original Message-----
>  > From: Subashini S [mailto:[EMAIL PROTECTED]
>  > Sent: Tuesday, December 02, 2008 1:26 PM
>  > To: HttpClient User Discussion
>  > Subject: unreadable response body
>  >
>  > Hi,
>  > I'm trying to fetch a url similar to the one below:
>  > http://www.metacafe.com/watch/yt-
>  > 6gDlmA5SF9E/cow_slaughtering_on_eid_ul_zoha/
>  >
>
> > However with httpclient the fetched content seems to be unreadable
>  > and looks like a binary content.
>
>
> The server is indeed returning binary content; it is gzip
>  compressing the response body.  If you examine the response
>  headers from the server, you will see a header which announces
>  this fact:
>
>  Content-Encoding: gzip
>
>  I do not think HttpClient has built-in support for gzip.
>  You will, I believe, have to handle the decompression yourself.
>

There's an example here:

http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/examples/org/apache/http/examples/client/ClientGZipContentCompression.java

>  I hope this helps,
>
>  regards,
>
>
>  Mike
>
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to