hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Albretch Mueller <lbrt...@gmail.com>
Subject Re: why are so different the response headers as reported by wget and httpclient?
Date Tue, 07 May 2013 21:15:48 GMT
> I'd suggest you not set the Host header manually ...

 That did it! HC is seamlessly handling redirection, yet I still have
2 questions:

 1) even if, since all I need are the headers, for which I "only" need to go:

  Header[] RspnsHdrs = httpResponse.getAllHeaders();
// __ closing underlying stream (just getting all HTTP headers for
this URL's connection)
 InputStream IS = httpEnt.getContent();
 IS.close();

 the InputStream is taking like a minute to actually close. Why is
that happening?

 It seems once you go "GET ..." the server does as you tell it and
sends the data anyway, which seems to be patiently swallowed by HC,
even if the data is not saved to local storage

 Is there a way to just get the headers and the negotiation without
the actual payload? (like the spider option of wget)

 2) What is the listener interface you need to implement to replicate
with HC what you get from the wire log via commons logging?

 Thanks,
 lbrtchx

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


Mime
View raw message