aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-05-03 10:45:39 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-05-03 10:45:39 +0000
commita33eb9881c2599fa6405433326562f20527c4a7d (patch)
tree69dcbbb660d867e1c698d780075a550716819db8 /lib/transfer.c
parentbbe8aa073e200507a5304a8dfa50d1e205a57421 (diff)
Cris Bailiff's fix to never attempt to get the body of a 304-reply!
Diffstat (limited to 'lib/transfer.c')
-rw-r--r--lib/transfer.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 0fc575496..df5201446 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -408,11 +408,21 @@ Transfer(struct connectdata *c_conn)
}
data->progress.httpcode = httpcode;
data->progress.httpversion = httpversion;
+
if(httpversion == 0)
/* Default action for HTTP/1.0 must be to close, unless
we get one of those fancy headers that tell us the
server keeps it open for us! */
conn->bits.close = TRUE;
+
+ if (httpcode == 304)
+ /* (quote from RFC2616, section 10.3.5):
+ * The 304 response MUST NOT contain a
+ * message-body, and thus is always
+ * terminated by the first empty line
+ * after the header fields.
+ */
+ conn->size=0;
}
else {
header = FALSE; /* this is not a header line */