mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 13:30:08 +01:00
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 90692e3eff)
This commit is contained in:
parent
da27c799ad
commit
46c836e5cd
1 changed files with 2 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue