aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/transfer.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 71fb3961e..feaf93695 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -594,9 +594,12 @@ static CURLcode readwrite_data(struct SessionHandle *data,
dataleft = conn->chunk.dataleft;
if(dataleft != 0) {
- infof(conn->data, "Leftovers after chunking. "
- " Rewinding %zu bytes\n",dataleft);
- read_rewind(conn, dataleft);
+ infof(conn->data, "Leftovers after chunking: %zu bytes", dataleft);
+ if(conn->data->multi && Curl_multi_canPipeline(conn->data->multi)) {
+ /* only attempt the rewind if we truly are pipelining */
+ infof(conn->data, "Rewinding %zu bytes\n",dataleft);
+ read_rewind(conn, dataleft);
+ }
}
}
/* If it returned OK, we just keep going */