diff options
author | Daniel Stenberg <daniel@haxx.se> | 2011-06-07 13:40:11 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2011-06-07 13:40:11 +0200 |
commit | c0b9dd27b553c2a2fff8e0259a7ad694172ece86 (patch) | |
tree | c8b66f1b1f664e883bbbb31303a15d3556c154ca /lib | |
parent | 6aff805942c86419ccf028f13811c3ee3d6ae8a0 (diff) |
HTTP time condition: force closure for 200 OK
When a time condition isn't met, so that no body is delivered to the
application even though a 2xx response is being read from the server, we
must close the connection to avoid a re-use of the connection to be
completely tricked.
Added test 1128 to verify.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/transfer.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/transfer.c b/lib/transfer.c index c82fb3594..94cd6d6f9 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -563,6 +563,9 @@ static CURLcode readwrite_data(struct SessionHandle *data, if(!Curl_meets_timecondition(data, k->timeofdoc)) { *done = TRUE; + /* we abort the transfer before it is completed == we ruin the + re-use ability. Close the connection */ + conn->bits.close = TRUE; return CURLE_OK; } } /* we have a time condition */ |