From 87ad80cacc499d664f8e5ef11b0be3a97595ac42 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 9 Aug 2010 12:32:04 +0200 Subject: [PATCH] Specify the connection header when keep alive connections are not used. --- src/ChangeLog | 5 +++++ src/http.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0e45a521..559589f7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-08-09 Giuseppe Scrivano + + * http.c (gethttp): Specify the connection header when keep alive + connections are not used. + 2010-08-06 Giuseppe Scrivano * css-url.c (get_uri_string): Skip empty urls. diff --git a/src/http.c b/src/http.c index 67952967..7b27ae67 100644 --- a/src/http.c +++ b/src/http.c @@ -1691,7 +1691,9 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy, rel_value); } - if (!inhibit_keep_alive) + if (inhibit_keep_alive) + request_set_header (req, "Connection", "Close", rel_none); + else request_set_header (req, "Connection", "Keep-Alive", rel_none); if (opt.post_data || opt.post_file_name) -- 2.39.2