summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-03-26 06:19:11 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-03-26 06:19:11 +0000
commit31f9d4016df85b2b5ebcfb4afd7c17d2415da0b1 (patch)
tree2cea189653a47fafad536a5091a6ace565359cc0
parentbb601731ea2585aa2890689d8b09082042be7e30 (diff)
downloadgnurl-31f9d4016df85b2b5ebcfb4afd7c17d2415da0b1.tar.gz
gnurl-31f9d4016df85b2b5ebcfb4afd7c17d2415da0b1.tar.bz2
gnurl-31f9d4016df85b2b5ebcfb4afd7c17d2415da0b1.zip
'Connection: keep-alive' is now understood when sent by a HTTP/1.0 server
as an indication of a persistant connection
-rw-r--r--lib/transfer.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 9598a0ac5..4ce6f32aa 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -422,6 +422,18 @@ Transfer(struct connectdata *c_conn)
conn->bits.close = FALSE; /* don't close when done */
infof(data, "HTTP/1.0 proxy connection set to keep alive!\n");
}
+ else if((httpversion == 0) &&
+ strnequal("Connection: keep-alive", p,
+ strlen("Connection: keep-alive"))) {
+ /*
+ * A HTTP/1.0 reply with the 'Connection: keep-alive' line
+ * tells us the connection will be kept alive for our
+ * pleasure. Default action for 1.0 is to close.
+ *
+ * [RFC2068, section 19.7.1] */
+ conn->bits.close = FALSE; /* don't close when done */
+ infof(data, "HTTP/1.0 connection set to keep alive!\n");
+ }
else if (strnequal("Connection: close", p,
strlen("Connection: close"))) {
/*