]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http_perhapsrewind: don't abort CONNECT requests
authorStefan Bühler <buehler@teamviewer.com>
Mon, 24 Nov 2014 09:42:01 +0000 (10:42 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 4 Dec 2014 22:46:31 +0000 (14:46 -0800)
...they never have a body

lib/http.c

index c56689893eee663d0ef3ead87e219ee2be1e7f20..ee0a9a481cc0ec217058ecf263c99195309f36b0 100644 (file)
@@ -468,10 +468,15 @@ static CURLcode http_perhapsrewind(struct connectdata *conn)
 
   bytessent = http->writebytecount;
 
-  if(conn->bits.authneg)
+  if(conn->bits.authneg) {
     /* This is a state where we are known to be negotiating and we don't send
        any data then. */
     expectsend = 0;
+  }
+  else if(!conn->bits.protoconnstart) {
+    /* HTTP CONNECT in progress: there is no body */
+    expectsend = 0;
+  }
   else {
     /* figure out how much data we are expected to send */
     switch(data->set.httpreq) {