Browse Source

Disable keep-alive for HTTP client

Frédéric Guillot 8 năm trước cách đây
mục cha
commit
b5c317f971
1 tập tin đã thay đổi với 1 bổ sung và 0 xóa
  1. 1 0
      http/client/client.go

+ 1 - 0
http/client/client.go

@@ -224,6 +224,7 @@ func (c *Client) buildHeaders() http.Header {
 		headers.Add("Authorization", c.authorizationHeader)
 		headers.Add("Authorization", c.authorizationHeader)
 	}
 	}
 
 
+	headers.Add("Connection", "close")
 	return headers
 	return headers
 }
 }