mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-19 03:06:33 +00:00
Explicitly tell the server that the client accepts CBOR.
This commit is contained in:
parent
106cc708a0
commit
0aa8089d81
@ -99,6 +99,8 @@ class StorageClient(object):
|
||||
into corresponding HTTP headers.
|
||||
"""
|
||||
headers = self._get_headers(headers)
|
||||
|
||||
# Add secrets:
|
||||
for secret, value in [
|
||||
(Secrets.LEASE_RENEW, lease_renew_secret),
|
||||
(Secrets.LEASE_CANCEL, lease_cancel_secret),
|
||||
@ -110,6 +112,10 @@ class StorageClient(object):
|
||||
"X-Tahoe-Authorization",
|
||||
b"%s %s" % (secret.value.encode("ascii"), b64encode(value).strip()),
|
||||
)
|
||||
|
||||
# Note we can accept CBOR:
|
||||
headers.addRawHeader("Accept", CBOR_MIME_TYPE)
|
||||
|
||||
return self._treq.request(method, url, headers=headers, **kwargs)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user