aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-04-08 07:27:22 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-04-08 07:27:22 +0000
commit5d28a857a45c5069238377a34c153458c187787a (patch)
treebe8e551d6fed6b63f8dff508691de0030aced473 /lib
parentedbe0d166cfdd30e1e15df08f1acbb26a3be1d3c (diff)
based on Jacky Lam's "HTTP 1.0 304-only" fix, this change makes a 304 reply
always stop reading after the headers no matter what 'close' is.
Diffstat (limited to 'lib')
-rw-r--r--lib/transfer.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 5d6f13309..671dba560 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -366,15 +366,12 @@ CURLcode Curl_readwrite(struct connectdata *conn,
reading! */
if(-1 != conn->size)
conn->maxdownload = conn->size;
-
- /* If max download size is *zero* (nothing) we already
- have nothing and can safely return ok now! */
- if(0 == conn->maxdownload)
- stop_reading = TRUE;
-
- /* What to do if the size is *not* known? */
}
-
+ /* If max download size is *zero* (nothing) we already
+ have nothing and can safely return ok now! */
+ if(0 == conn->maxdownload)
+ stop_reading = TRUE;
+
if(stop_reading) {
/* we make sure that this socket isn't read more now */
k->keepon &= ~KEEP_READ;
@@ -447,6 +444,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
* NOT contain a message-body, and thus is always terminated
* by the first empty line after the header fields. */
conn->size=0;
+ conn->maxdownload=0;
break;
default:
/* nothing */