aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/transfer.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 0ebe19652..3337b130a 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -228,9 +228,9 @@ checkhttpprefix(struct SessionHandle *data,
}
/*
- * Curl_readrewind() rewinds the read stream. This typically (so far) only
- * used for HTTP POST/PUT with multi-pass authentication when a sending was
- * denied and a resend is necessary.
+ * Curl_readrewind() rewinds the read stream. This is typically used for HTTP
+ * POST/PUT with multi-pass authentication when a sending was denied and a
+ * resend is necessary.
*/
CURLcode Curl_readrewind(struct connectdata *conn)
{
@@ -238,6 +238,11 @@ CURLcode Curl_readrewind(struct connectdata *conn)
conn->bits.rewindaftersend = FALSE; /* we rewind now */
+ /* explicitly switch of sending data on this transfer now since we are about
+ to restart a new transfer and thus we want to avoid inadvertently sending
+ more data on the existing connection until the next request starts */
+ data->req.keepon &= ~KEEP_WRITE;
+
/* We have sent away data. If not using CURLOPT_POSTFIELDS or
CURLOPT_HTTPPOST, call app to rewind
*/