From 48e47e82b9e23ebaaea0a7514150fd80a118c6c8 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 26 Aug 2023 11:42:40 +0100 Subject: [PATCH] Allow redirections on request --- session.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/session.py b/session.py index 4ef4be190..b36072e70 100644 --- a/session.py +++ b/session.py @@ -918,7 +918,8 @@ def get_method(method_name: str, xml_str: str, try: result = session.request(method_name, url, headers=session_headers, data=xml_str, - params=session_params, timeout=timeout_sec) + params=session_params, timeout=timeout_sec, + allow_redirects=True) if result.status_code not in (200, 207): if result.status_code == 401: print("WARN: get_method " + url + ' rejected by secure mode')