Allow redirections on request

main
Bob Mottram 2023-08-26 11:42:40 +01:00
parent 09ecf4f42a
commit 48e47e82b9
1 changed files with 2 additions and 1 deletions

View File

@ -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')