diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-08-04 22:00:22 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-08-04 22:00:22 +0000 |
commit | 3a499099af52ddc69a3647767521c99c9e9c42e4 (patch) | |
tree | 7c67c35412c825d8c7e6011d0b0fa27e64ca057c /lib/transfer.c | |
parent | 931fc45f05e7370fd815c34884863f2b56920b5f (diff) |
- Test cases 1051, 1052 and 1055 were added by Daniel Fandrich on July 30 and
proved how PUT and POST with a redirect could lead to a "hang" due to the
data stream not being rewound properly when it had to in order to get sent
properly (again) to the subsequent URL. This is now fixed and these test
cases are no longer disabled.
Diffstat (limited to 'lib/transfer.c')
-rw-r--r-- | lib/transfer.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/transfer.c b/lib/transfer.c index ea6cfa357..330ba7df6 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -1116,6 +1116,12 @@ CURLcode Curl_readwrite(struct connectdata *conn, data->req.newurl = strdup(data->req.location); /* clone */ if(!data->req.newurl) return CURLE_OUT_OF_MEMORY; + + /* some cases of POST and PUT etc needs to rewind the data + stream at this point */ + result = Curl_http_perhapsrewind(conn); + if(result) + return result; } } } @@ -1570,6 +1576,7 @@ CURLcode Curl_readwrite(struct connectdata *conn, /* we've waited long enough, continue anyway */ k->exp100 = EXP100_SEND_DATA; k->keepon |= KEEP_WRITE; + infof(data, "Done waiting for 100-continue\n"); } } } |