Index: java/org/apache/commons/httpclient/HttpMethodBase.java =================================================================== RCS file: /home/cvspublic/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java,v retrieving revision 1.126 diff -u -r1.126 HttpMethodBase.java --- java/org/apache/commons/httpclient/HttpMethodBase.java 27 Mar 2003 20:58:27 -0000 1.126 +++ java/org/apache/commons/httpclient/HttpMethodBase.java 28 Mar 2003 03:14:59 -0000 @@ -2000,7 +2000,10 @@ //read out the HTTP status string String statusString = conn.readLine(); - while ((statusString != null) && !statusString.startsWith("HTTP/")) { + while ((statusString != null) && !statusString.startsWith("HTTP")) { + if (Wire.enabled()) { + Wire.input(statusString + "\r\n"); + } statusString = conn.readLine(); } if (statusString == null) { @@ -2008,7 +2011,7 @@ // response. Try again. throw new HttpRecoverableException("Error in parsing the status " + " line from the response: unable to find line starting with" - + " \"HTTP/\""); + + " \"HTTP\""); } if (Wire.enabled()) { Wire.input(statusString + "\r\n"); @@ -2022,6 +2025,9 @@ http11 = false; } else if (httpVersion.equals("HTTP/1.1")) { http11 = true; + } else if (httpVersion.equals("HTTP")) { + // some servers do not specify the version correctly, we will just assume 1.0 + http11 = false; } else { throw new HttpException("Unrecognized server protocol: '" + httpVersion + "'"); Index: java/org/apache/commons/httpclient/StatusLine.java =================================================================== RCS file: /home/cvspublic/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/StatusLine.java,v retrieving revision 1.8 diff -u -r1.8 StatusLine.java --- java/org/apache/commons/httpclient/StatusLine.java 30 Jan 2003 05:01:54 -0000 1.8 +++ java/org/apache/commons/httpclient/StatusLine.java 28 Mar 2003 03:15:00 -0000 @@ -121,9 +121,9 @@ //check validity of the Status-Line - if (!statusLine.startsWith("HTTP/")) { + if (!statusLine.startsWith("HTTP")) { throw new HttpException("Status-Line '" + statusLine - + "' does not start with HTTP/"); + + "' does not start with HTTP"); } //handle the HTTP-Version