Skip to content

Commit

Permalink
Always specify header of connection keep-alive regardless of python v… (
Browse files Browse the repository at this point in the history
ansible#62218)

* Always specify header of connection keep-alive regardless of python version.

* Add chgangelog fragment

* Fixes to changelog fragment

(cherry picked from commit 606e139)
  • Loading branch information
ctrufan committed Sep 12, 2019
1 parent 7e3d322 commit 604f7a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelogs/fragments/62218-fix-to-entrust-api.yml
@@ -0,0 +1,3 @@
bugfixes:
- "openssl_certificate - When provider is ``entrust``, use a ``connection: keep-alive`` header for ECS API connections."
- "ecs_certificate - Always specify header ``connection: keep-alive`` for ECS API connections."
5 changes: 4 additions & 1 deletion lib/ansible/module_utils/ecs/api.py
Expand Up @@ -241,7 +241,10 @@ def client(self):
return resource

def _set_config(self, name, **kwargs):
headers = {"Content-Type": "application/json"}
headers = {
"Content-Type": "application/json",
"Connection": "keep-alive",
}
self.request = Request(headers=headers, timeout=60)

configurators = [self._read_config_vars]
Expand Down

0 comments on commit 604f7a1

Please sign in to comment.