From fb171061cf6f749726aa60e2e26304276c18b0ea Mon Sep 17 00:00:00 2001 From: Drew Short Date: Thu, 27 May 2021 19:51:52 -0500 Subject: [PATCH] Remove POST limiting --- keycloak/connection.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/keycloak/connection.py b/keycloak/connection.py index 7d5ed2f..3bc55f7 100644 --- a/keycloak/connection.py +++ b/keycloak/connection.py @@ -49,16 +49,16 @@ class ConnectionManager(object): self._s = requests.Session() self._s.auth = lambda x: x # don't let requests add auth headers - # retry once to reset connection with Keycloak after tomcat's ConnectionTimeout - # see https://github.com/marcospereirampj/python-keycloak/issues/36 - for protocol in ('https://', 'http://'): - adapter = HTTPAdapter(max_retries=1) - # adds POST to retry whitelist - allowed_methods = set(adapter.max_retries.allowed_methods) - allowed_methods.add('POST') - adapter.max_retries.allowed_methods = frozenset(allowed_methods) - - self._s.mount(protocol, adapter) + # # retry once to reset connection with Keycloak after tomcat's ConnectionTimeout + # # see https://github.com/marcospereirampj/python-keycloak/issues/36 + # for protocol in ('https://', 'http://'): + # adapter = HTTPAdapter(max_retries=1) + # # adds POST to retry whitelist + # allowed_methods = set(adapter.max_retries.allowed_methods) + # allowed_methods.add('POST') + # adapter.max_retries.allowed_methods = frozenset(allowed_methods) + + # self._s.mount(protocol, adapter) def __del__(self): self._s.close()