Index: java/org/apache/commons/httpclient/HttpMethodBase.java =================================================================== --- java/org/apache/commons/httpclient/HttpMethodBase.java (revision 153114) +++ java/org/apache/commons/httpclient/HttpMethodBase.java (working copy) @@ -1,7 +1,7 @@ /* * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java,v 1.222 2005/01/14 21:16:40 olegk Exp $ * $Revision: 1.222 $ - * $Date: 2005/01/14 21:16:40 $ + * $Date$ * * ==================================================================== * @@ -92,7 +92,7 @@ * @author Gary Gregory * @author Christian Kohlschuetter * - * @version $Revision: 1.222 $ $Date: 2005/01/14 21:16:40 $ + * @version $Revision: 1.222 $ $Date$ */ public abstract class HttpMethodBase implements HttpMethod { @@ -1916,8 +1916,6 @@ writeRequestLine(state, conn); writeRequestHeaders(state, conn); conn.writeLine(); // close head - // make sure the status line and headers have been sent - conn.flushRequestOutputStream(); if (Wire.HEADER_WIRE.enabled()) { Wire.HEADER_WIRE.output("\r\n"); } @@ -1931,6 +1929,10 @@ if ((expectvalue != null) && (expectvalue.compareToIgnoreCase("100-continue") == 0)) { if (ver.greaterEquals(HttpVersion.HTTP_1_1)) { + + // make sure the status line and headers have been sent + conn.flushRequestOutputStream(); + int readTimeout = conn.getParams().getSoTimeout(); try { conn.setSocketTimeout(RESPONSE_WAIT_TIME_MS);