Skip to content

Commit aeff86b

Browse files
committed
Encode response message as utf-8
Signed-off-by: Ivan Kanakarakis <[email protected]>
1 parent 9f412cc commit aeff86b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/saml2/httputil.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,7 @@ def _response(self, message="", **argv):
6262
message = mte.render(**argv)
6363

6464
if isinstance(message, six.string_types):
65-
# Note(JP): A WSGI app should always respond
66-
# with bytes, so at this point the message should
67-
# become encoded instead of passing a text object.
68-
return [message.encode()]
65+
return [message.encode('utf-8')]
6966
elif isinstance(message, six.binary_type):
7067
return [message]
7168
else:

0 commit comments

Comments
 (0)