Index: TestBadContentLength.java =================================================================== RCS file: /home/cvspublic/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestBadContentLength.java,v retrieving revision 1.1 diff -u -r1.1 TestBadContentLength.java --- TestBadContentLength.java 5 Dec 2003 21:23:14 -0000 1.1 +++ TestBadContentLength.java 8 Dec 2003 15:22:46 -0000 @@ -194,22 +194,17 @@ client.executeMethod(m); assertEquals(200, m.getStatusCode()); - assertEquals(null, m.getResponseBodyAsString()); + assertEquals("12345", m.getResponseBodyAsString()); m.recycle(); client.executeMethod(m); assertEquals(200, m.getStatusCode()); - boolean gotException = false; - try { - InputStream in = m.getResponseBodyAsStream(); - while (in.read() != -1) { - } - fail("Did not receive expected ProtocolException"); - } catch (ProtocolException e) { - /* expected */ + InputStream in = m.getResponseBodyAsStream(); + while (in.read() != -1) { } + m.releaseConnection(); } Index: TestNoHost.java =================================================================== RCS file: /home/cvspublic/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestNoHost.java,v retrieving revision 1.26 diff -u -r1.26 TestNoHost.java --- TestNoHost.java 19 Oct 2003 18:46:03 -0000 1.26 +++ TestNoHost.java 8 Dec 2003 15:22:46 -0000 @@ -108,6 +108,7 @@ suite.addTest(TestExceptions.suite()); suite.addTest(TestHttpVersion.suite()); suite.addTest(TestHttpParser.suite()); + suite.addTest(TestBadContentLength.suite()); return suite; }