summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/certtools.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/certtools.py b/tools/certtools.py
index 5aa2251..cb56a8d 100644
--- a/tools/certtools.py
+++ b/tools/certtools.py
@@ -328,7 +328,10 @@ def http_request_session(url, data=None, key=None, verifynode=None, params=None,
result = session.send(prepared_req, verify=sslparameters.cafile)
result.raise_for_status()
authheader = result.headers.get('X-Catlfish-Auth')
- data = result.text
+ if result.headers['Content-Type'] == "application/octet-stream":
+ data = result.content
+ else:
+ data = result.text
check_auth_header(authheader, verifynode, result.content, url_to_sign)
return data