Hi there,

I tried to make a HEAD request to <http://www.niedersachsen.de/>.

Code is like this:

 String uri = "http://www.niedersachsen.de/";;
 HttpClient httpClient = new HttpClient();
 HttpMethod httpMethod = new HeadMethod(uri);
 try
 {
     int responseCode = httpClient.executeMethod(httpMethod);
     System.out.println(responseCode);
 }
 catch (Exception e)
 {
     e.printStackTrace();
 }
 finally
 {
     httpMethod.releaseConnection();
 }

I used HttpClient 2.0.2 or 3.0-rc1. Both hang at

  while ((ch = inputStream.read()) >= 0) {

in HttpParser.readRawLine(InputStream inputStream)

If I make a HEAD request via telnet, I get the following response:

HTTP/1.1 302 Found
Date: Wed, 02 Mar 2005 15:53:03 GMT
Server: Apache
Location: http://www.niedersachsen.de/home.jsp
Content-Type: text/html; charset=iso-8859-1
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
                            (Te Deum, 4th cent.)


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to