We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6374209 commit e1060b1Copy full SHA for e1060b1
djangosaml2/utils.py
@@ -60,13 +60,11 @@ def get_idp_sso_supported_bindings(idp_entity_id=None, config=None):
60
61
def get_location(http_info):
62
"""Extract the redirect URL from a pysaml2 http_info object"""
63
- assert 'headers' in http_info
64
- headers = http_info['headers']
65
-
66
- assert len(headers) == 1
67
- header_name, header_value = headers[0]
68
- assert header_name == 'Location'
69
- return header_value
+ try:
+ headers = dict(http_info['headers'])
+ return headers['Location']
+ except KeyError:
+ return http_info['url']
70
71
72
def fail_acs_response(request, *args, **kwargs):
0 commit comments