mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Don't close the connection if we're in a known negotiation mode and we won't
send any data anyway. Probably the bug Tom Moers noticed.
This commit is contained in:
parent
f00f050d1b
commit
158588640a
36
lib/http.c
36
lib/http.c
@ -230,21 +230,27 @@ static CURLcode perhapsrewind(struct connectdata *conn)
|
|||||||
|
|
||||||
bytessent = http->writebytecount;
|
bytessent = http->writebytecount;
|
||||||
|
|
||||||
/* figure out how much data we are expected to send */
|
if(conn->bits.authneg)
|
||||||
switch(data->set.httpreq) {
|
/* This is a state where we are known to be negotiating and we don't send
|
||||||
case HTTPREQ_POST:
|
any data then. */
|
||||||
if(data->set.postfieldsize != -1)
|
expectsend = 0;
|
||||||
expectsend = data->set.postfieldsize;
|
else {
|
||||||
break;
|
/* figure out how much data we are expected to send */
|
||||||
case HTTPREQ_PUT:
|
switch(data->set.httpreq) {
|
||||||
if(data->set.infilesize != -1)
|
case HTTPREQ_POST:
|
||||||
expectsend = data->set.infilesize;
|
if(data->set.postfieldsize != -1)
|
||||||
break;
|
expectsend = data->set.postfieldsize;
|
||||||
case HTTPREQ_POST_FORM:
|
break;
|
||||||
expectsend = http->postsize;
|
case HTTPREQ_PUT:
|
||||||
break;
|
if(data->set.infilesize != -1)
|
||||||
default:
|
expectsend = data->set.infilesize;
|
||||||
break;
|
break;
|
||||||
|
case HTTPREQ_POST_FORM:
|
||||||
|
expectsend = http->postsize;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
conn->bits.rewindaftersend = FALSE; /* default */
|
conn->bits.rewindaftersend = FALSE; /* default */
|
||||||
|
Loading…
Reference in New Issue
Block a user