I'm not sure about the correct way to do this. For myself, I hacked the source code in my local version to do this. But by reading the source code,
http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/src/java/org/apache /commons/httpclient/log/LogSource.java?rev=1.8&content-type=text/vnd.viewcvs -markup It will use log4j if it finds it in your classpath. Then just configure log4j to enable the log for category "httpclient.wire". But I never had enough patience to figure out where does log4j find its configuration file, ... so I hacked :) Let me know if you figured this out. -xiaowei -----Original Message----- From: Donald Ball [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 14, 2002 12:07 PM To: Jakarta Commons Developers List Subject: RE: bug in httpclient, can't talk to realaudio http server On Tue, 2002-05-14 at 14:57, Xiaowei Jiang wrote: > Can you post more details about the error. It seems to be working for me. > That website is responding HTTP/1.0 to a HTTP/1.1 request, but that > shouldn't cause this problem. Could you turn on the log and see what's > transfered on the wire? i'd be happy to, but i don't know what you mean by turn on the log. i already posted the results of talking to the server manually. i patched HttpMethodBase to print the status lines: String statusLine = conn.readLine(); System.err.println("STATUS LINE: "+statusLine); while(statusLine != null && !statusLine.startsWith("HTTP/")) { statusLine = conn.readLine(); System.err.println("STATUS LINE: "+statusLine); } if (statusLine == null) { // A null statusLine means the connection was lost before we got a response. Try again. throw new HttpRecoverableException("Error in parsing the status line from the response: unable to find line starting with \"HTTP/\""); } and it reports this: STATUS LINE: null STATUS LINE: null STATUS LINE: null STATUS LINE: null which seems to indicate that the problem is actually in HttpConnection. if you can tell me how to turn on the log, i'll be happy to do so. thanks. - donald -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
