http error response: stop sending when error is received

When libcurl has said to the server that there's a POST or PUT coming
(with a content-length and all) it has to either deliver that amount of
data or it needs to close the connection before trying a second request.

Adds test case 1129, 1130 and 1131

The bug report is about when used with 100-continue, but the change is
more generic.

Bug: http://curl.haxx.se/mail/lib-2011-06/0191.html
Reported by: Steven Parkes
This commit is contained in:
Daniel Stenberg
2011-07-11 23:24:45 +02:00
parent d007c3ca76
commit 3f9b4afdfd
6 changed files with 354 additions and 15 deletions

View File

@@ -1043,6 +1043,12 @@ CURLcode Curl_readwrite(struct connectdata *conn,
if(result || *done)
return result;
}
else if(k->keepon & KEEP_RECV) {
DEBUGF(infof(data, "additional stuff not fine %s:%d: %d %d\n",
__FILE__, __LINE__,
select_res & CURL_CSELECT_IN,
conn->bits.stream_was_rewound));
}
/* If we still have writing to do, we check if we have a writable socket. */
if((k->keepon & KEEP_SEND) && (select_res & CURL_CSELECT_OUT)) {