Thanks!

I will try not sending the header "Accept-Encoding: gzip, deflate" header.  I 
was trying to send the exact headers that my Web Browser sends when it connects 
to the site.

If removing the header does not work I will try the example that you supplied.


-----Original Message-----
From: Ortwin Glück [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 23, 2006 11:55 AM
To: HttpClient Project
Subject: Re: Response Content Error



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: [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