Make sure to decode manifests into utf-8 when necessary
This fixes a decoding error
This commit is contained in:
parent
6cc7102ec8
commit
48e584905a
15 changed files with 268 additions and 32 deletions
|
|
@ -81,6 +81,7 @@ class ProtocolOptions(object):
|
|||
self.push_by_manifest_digest = False
|
||||
self.request_addr = None
|
||||
self.skip_blob_push_checks = False
|
||||
self.ensure_ascii = True
|
||||
|
||||
|
||||
@add_metaclass(ABCMeta)
|
||||
|
|
@ -120,7 +121,7 @@ class RegistryProtocol(object):
|
|||
def conduct(self, session, method, url, expected_status=200, params=None, data=None,
|
||||
json_data=None, headers=None, auth=None, options=None):
|
||||
if json_data is not None:
|
||||
data = json.dumps(json_data)
|
||||
data = json.dumps(json_data).encode('utf-8')
|
||||
headers = headers or {}
|
||||
headers['Content-Type'] = 'application/json'
|
||||
|
||||
|
|
|
|||
Reference in a new issue