commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r153643 - jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java
Date Sun, 13 Feb 2005 17:24:42 GMT
Author: olegk
Date: Sun Feb 13 09:24:39 2005
New Revision: 153643

URL: http://svn.apache.org/viewcvs?view=rev&rev=153643
Log:
PR #33468 (httpclient doesn't read and parse response from certain types of proxy servers
when POST method is used)

Changelog:

HttpClient no longer flushes the request line and request headers prior to writing the request
body if the 'expect: continue' handshake is not used.

Contributed by Peter Tolmachov <peter.tolmachov at agfa.com>
Reviewed by Oleg Kalnichevski, Michael Becke

Modified:
    jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java

Modified: jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java?view=diff&r1=153642&r2=153643
==============================================================================
--- jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java
(original)
+++ jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java
Sun Feb 13 09:24:39 2005
@@ -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 <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
  * @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);



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message