hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ortwin Gl├╝ck <...@odi.ch>
Subject Re: Response Content Error
Date Wed, 23 Aug 2006 16:54:59 GMT


Gerdes, Tom wrote:
> FINE >> "Accept-Encoding: gzip, deflate[\r][\n]"

Why are you sending this in the first place? Stock HttpClient does NOT 
handle any content encoding.

> FINE << "Content-Encoding: gzip[\r][\n]"

In your case this should do the trick:

InputStream in = method.getResponseAsStream();
Header enc = method.getResponseHeader("Content-Encoding");
if (enc != null && "gzip".equals(enc.getValue())) {
   InputStream in = new GZIPInputStream(in);
}


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


Mime
View raw message