summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIoannis Kakavas <jkakavas@gmail.com>2017-07-18 10:21:23 +0300
committerGitHub <noreply@github.com>2017-07-18 10:21:23 +0300
commit1da840e4dc4b7ea4685dca4f214b87b5d5d17d95 (patch)
tree8d54396f51c5e0704ff27045ec706e25f10b9e33 /src
parent0d46e44d266de9faabf49e76e8e5b2137ba66459 (diff)
parent9de2347f231913371b7911d4197d48162a53df32 (diff)
downloadpysaml2-1da840e4dc4b7ea4685dca4f214b87b5d5d17d95.tar.gz
Merge pull request #428 from bogdan-ds/remote_encoding_fix
Using the binary response content of requests to avoid incorrect metadata encoding
Diffstat (limited to 'src')
-rw-r--r--src/saml2/mdstore.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/saml2/mdstore.py b/src/saml2/mdstore.py
index eff75c8b..72825ea8 100644
--- a/src/saml2/mdstore.py
+++ b/src/saml2/mdstore.py
@@ -750,7 +750,7 @@ class MetaDataExtern(InMemoryMetaData):
"""
response = self.http.send(self.url)
if response.status_code == 200:
- _txt = response.text.encode("utf-8")
+ _txt = response.content
return self.parse_and_check_signature(_txt)
else:
logger.info("Response status: %s", response.status_code)
@@ -814,7 +814,7 @@ class MetaDataMDX(InMemoryMetaData):
response = requests.get(mdx_url, headers={
'Accept': SAML_METADATA_CONTENT_TYPE})
if response.status_code == 200:
- _txt = response.text.encode("utf-8")
+ _txt = response.content
if self.parse_and_check_signature(_txt):
return self.entity[item]