hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Speirs <wspe...@apache.org>
Subject Re: Getting a compressed version of web page
Date Tue, 29 May 2012 09:41:03 GMT
Is the site setup to send a compressed version?

Bill-
On May 28, 2012 8:26 PM, "Mugoma Joseph Okomba" <mugoma@yengas.com> wrote:

> Hello,
>
> I have setup URL download:
> HttpGet request = new HttpGet(url);
> request.addHeader("Accept-Encoding", "gzip,deflate");
>
> response.getFirstHeader("Content-Encoding") shows "Content-Encoding: gzip"
>
> However, entity.getContentEncoding() is null.
>
> If I put:
> entity = new GzipDecompressingEntity(entity);
>
> I get:
> java.io.IOException: Not in GZIP format
>
> It looks like the resulting page is plain text and not compressed even
> though "Content-Encoding" header shows it's gzip.
>
> I have tried this on several URLs (from different websites) but get same
> results.
>
> How can I get compressed version of web page? I am using HC 4.1
>
> Thanks in advance.
>
> Mugoma Joseph.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message