From: Stefan Bühler Date: Mon, 24 Nov 2014 09:42:01 +0000 (+0100) Subject: http_perhapsrewind: don't abort CONNECT requests X-Git-Tag: curl-7_40_0~222 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=576ac00eb396dd7fb2d12d0fe4b6fdeeba5071e6;p=thirdparty%2Fcurl.git http_perhapsrewind: don't abort CONNECT requests ...they never have a body --- diff --git a/lib/http.c b/lib/http.c index c56689893e..ee0a9a481c 100644 --- a/lib/http.c +++ b/lib/http.c @@ -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) {