summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/certtools.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/certtools.py b/tools/certtools.py
index 7a5f9fc..cb56a8d 100644
--- a/tools/certtools.py
+++ b/tools/certtools.py
@@ -328,8 +328,11 @@ 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
- check_auth_header(authheader, verifynode, data, url_to_sign)
+ 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
def get_signature(baseurl, data, key=None):