From 2a59fdf6e4be31c65ffddf9ce971bb8e91f7af44 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 16 Mar 2015 10:59:22 -0500 Subject: [PATCH] Turn off keepalive for connectivity checking --- ...able-HTTP-keepalive-for-connectivity.patch | 32 +++++++++++++++++++ NetworkManager.spec | 7 +++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 0001-connectivity-disable-HTTP-keepalive-for-connectivity.patch diff --git a/0001-connectivity-disable-HTTP-keepalive-for-connectivity.patch b/0001-connectivity-disable-HTTP-keepalive-for-connectivity.patch new file mode 100644 index 0000000..9978257 --- /dev/null +++ b/0001-connectivity-disable-HTTP-keepalive-for-connectivity.patch @@ -0,0 +1,32 @@ +From 46c836e5cd5342cab5dfb4cd6eb5daf6170b70a0 Mon Sep 17 00:00:00 2001 +From: Dan Williams +Date: Mon, 16 Mar 2015 10:44:16 -0500 +Subject: [PATCH] connectivity: disable HTTP keepalive for connectivity checks + +There won't be any further requests, so there's no point in keeping +the connection alive. Even if the HTTP server doesn't care, proxy +servers in-between might keep the connection open for a couple seconds +for keepalive, and we might as well be nice to them and tell them we +don't need to keep it alive. + +(cherry picked from commit 90692e3efff398f0e4420827fc6d7ac342360e5c) +--- + src/nm-connectivity.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/nm-connectivity.c b/src/nm-connectivity.c +index 4d5feef..85bd70a 100644 +--- a/src/nm-connectivity.c ++++ b/src/nm-connectivity.c +@@ -247,6 +247,8 @@ nm_connectivity_check_async (NMConnectivity *self, + if (priv->uri && priv->interval) { + msg = soup_message_new ("GET", priv->uri); + soup_message_set_flags (msg, SOUP_MESSAGE_NO_REDIRECT); ++ /* Disable HTTP/1.1 keepalive; the connection should not persist */ ++ soup_message_headers_append (msg->request_headers, "Connection", "close"); + soup_session_queue_message (priv->soup_session, + msg, + nm_connectivity_check_cb, +-- +2.1.0 + diff --git a/NetworkManager.spec b/NetworkManager.spec index 3e3924b..f95ad69 100644 --- a/NetworkManager.spec +++ b/NetworkManager.spec @@ -10,7 +10,7 @@ %define snapshot %{nil} %define git_sha %{nil} %define realversion 1.0.0 -%define release_version 7 +%define release_version 8 %define epoch_version 1 %define obsoletes_nmver 1:0.9.9.95-1 @@ -85,6 +85,7 @@ Patch2: NetworkManager-1.0.0-bridge_resume.patch Patch3: 0001-ip6-config-remove-the-link-local-address-on-address-.patch Patch4: bgo742823-connectivity-no-dns.patch +Patch5: 0001-connectivity-disable-HTTP-keepalive-for-connectivity.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -371,6 +372,7 @@ by nm-connection-editor and nm-applet in a non-graphical environment. %patch2 -p1 -b .bridge_resume %patch3 -p1 -b .v6ll-flush %patch4 -p1 -b .bgo742823-connectivity-no-dns.orig +%patch5 -p1 -b .0001-connectivity-disable-HTTP-keepalive-for-connectivity.orig %build @@ -663,6 +665,9 @@ fi %endif %changelog +* Mon Mar 16 2015 Dan Williams - 1:1.0.0-8 +- Turn off keepalive for connectivity checking + * Thu Mar 5 2015 Dan Williams - 1:1.0.0-7 - dns: revert resolv.conf symlink stuff (should only be in F23+, not F22)