You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Samuel Cheung <SC...@Novarra.com> on 2002/04/28 17:46:41 UTC

HTTP Client of Jakarta Commons Parsing Error

Hi, 

I am using the latest HTTP client latest build. I got the following error
when I execute URL get method for the site "http://realestate.yahoo.com". I
try other sites (e.g. "http://www.yahoo.com"), they work. but
"http://realestate.yahoo.com" fails.


org.apache.commons.httpclient.HttpException:
org.apache.commons.httpclient.HttpRecoverableException: Error in parsing the
status line from the response: unable to find line starting with "HTTP/"
at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:476
)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:301)
at TestHTTPClient.main(TestHTTPClient.java:20)
Exception in thread "main" 

My Test code:

public class TestHTTPClient {

	public static void main(String[] args) throws Exception {
	
PropertyConfigurator.configure("C:\\pir\\junitTestCase\\wipe\\log4j.conf");

		HttpClient hc = new HttpClient();
		UrlGetMethod ugm = new
UrlGetMethod("http://realstate.yahoo.com");
		ugm.setStrictMode(false);
		hc.startSession(new URL("http://realestate.yahoo.com"));
		int rc = hc.executeMethod(ugm);
		System.out.println(rc);
     }
}

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>