Thanks for the info on getResponseBody. That makes sense the way you explained.
Regarding the logging problem. I don't know what's going on, but basically I can see all of my logs coming out until executeMethod is called, then they all just stop, even doing things that should normally log values. I'll have to hunt around and see what I can find out about it. Thanks for getting back to me! -Patrick. On Wed, 2005-01-19 at 13:42 -0800, Patrick Mauro wrote: > I have two problems and they both strike me as odd, though that's > probably just because I do not know the internal workings of > commons-httpclient. > > 1) I have a routine that sends a request to a web server and receives > a file back. It works if I use getResponseBody(), I get an array of > bytes. If I use getResponseBodyAsStream() I do not appear to get any > data. However, if I call getResponseBody() before calling > getResponseBodyAsStream(), then I get data from the stream. > I wonder if there is some sort of buffering type thing going on here > that I don't understand. Patrick, The getResponseBody method buffers the response content, whereas getResponseBodyAsStream does not. It reads the content directly from the network socket, unless the content has already been buffered by a previous call to getResponseBody. This indeed can be quite confusing and I personally do think this represents a fairly serious problem with the existing API. > > 2) I used log4j to do logging here. However, after I run Httpclient's > executeMethod(...) then I no longer get any logging output from log4j. > I know that HttpClient does some of its own logging, could this be > conflicting and shutting down my logger? > This is not very likely. HttpClient does not use Log4J directly, not does it have any possibility to change configuration of the underlying logging toolkit using commons-logging Oleg > > Thanks! > If you need me to output debug info or some code, I can. > > > Patrick Mauro > Software Developer > Apparent Networks, Inc. > The Hudson House > Suite 400 - 321 Water Street > Vancouver, BC, Canada, V6B 1B8 > > e [EMAIL PROTECTED] > t 604 433 2333 Ext. 104 > f 604 433 2311 > www.apparentnetworks.com <http://www.apparentnetworks.com/> > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]