aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-03-29 12:28:25 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-03-29 12:28:25 +0000
commit158588640a6d79bb20b1b1ed6497b7802969868e (patch)
tree8b6033f5037b79b83c7cf8a8ffa5473dcb30b3d6 /lib
parentf00f050d1bd8bc0e643ef63286dc98f6a3afbf46 (diff)
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/http.c36
1 files changed, 21 insertions, 15 deletions
diff --git a/lib/http.c b/lib/http.c
index d86b34fa3..308f9efc3 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -230,21 +230,27 @@ static CURLcode perhapsrewind(struct connectdata *conn)
bytessent = http->writebytecount;
- /* figure out how much data we are expected to send */
- switch(data->set.httpreq) {
- case HTTPREQ_POST:
- if(data->set.postfieldsize != -1)
- expectsend = data->set.postfieldsize;
- break;
- case HTTPREQ_PUT:
- if(data->set.infilesize != -1)
- expectsend = data->set.infilesize;
- break;
- case HTTPREQ_POST_FORM:
- expectsend = http->postsize;
- break;
- default:
- break;
+ 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 {
+ /* figure out how much data we are expected to send */
+ switch(data->set.httpreq) {
+ case HTTPREQ_POST:
+ if(data->set.postfieldsize != -1)
+ expectsend = data->set.postfieldsize;
+ break;
+ case HTTPREQ_PUT:
+ if(data->set.infilesize != -1)
+ expectsend = data->set.infilesize;
+ break;
+ case HTTPREQ_POST_FORM:
+ expectsend = http->postsize;
+ break;
+ default:
+ break;
+ }
}
conn->bits.rewindaftersend = FALSE; /* default */