Thanks for the suggestions. I moved to HC 4.2 and tested several links and
compression appears to work. The only time compression fails is when the
URL redirects.

e.g.

a) curl -v -H "Accept-Encoding: gzip"
http://timesofindia.indiatimes.com/nri/us-canada-news/Indian-diplomats-daughter-files-lawsuit-seeks-1-5-million-in-damages/articleshow/13047591.cms
> test-it.gzip

vs

b) curl -v -H "Accept-Encoding: gzip"
http://articles.timesofindia.indiatimes.com/2012-05-08/us-canada-news/31626225_1_obscene-emails-lawsuit-krittika-biswas
> test-it-b.gzip


Note that the link in a) redirects to the link in b). Only the final URL
(in b) benefits from compression.

Is it possible that compression applies even for redirected URLs?

Thanks.

Joseph.

On Tue, May 29, 2012 4:39 pm, Sam Crawford wrote:
> A couple of suggestions:
>
> 1. Confirm with cURL that the website is definitely providing gzip'd
> data (you should output the content to a file, and then open it with a
> text editor): curl -v -H "Accept-Encoding: gzip" http://foo.bar.com >
> output.txt
> 2. Consider using the example provided at
> http://hc.apache.org/httpcomponents-client-ga/examples.html under
> "Custom protocol interceptors". This will handle gzip for you
> transparently.
>
> Thanks,
>
> Sam


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to