Skip to content

Commit d62a10c

Browse files
committed
Support both str and bytes SAML requests on the example idp
Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
1 parent ecc690e commit d62a10c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

example/idp2/idp.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,12 @@ def unpack_redirect(self):
109109
return None
110110

111111
def unpack_post(self):
112-
_dict = parse_qs(get_post(self.environ))
112+
post_data = get_post(self.environ)
113+
_dict = parse_qs(
114+
post_data
115+
if isinstance(post_data, str)
116+
else post_data.decode('utf-8')
117+
)
113118
logger.debug("unpack_post:: %s", _dict)
114119
try:
115120
return dict([(k, v[0]) for k, v in _dict.items()])

0 commit comments

Comments
 (0)