diff --git a/imagegw/shifter_imagegw/dockerv2.py b/imagegw/shifter_imagegw/dockerv2.py index 87ef3b98..abfca1b7 100755 --- a/imagegw/shifter_imagegw/dockerv2.py +++ b/imagegw/shifter_imagegw/dockerv2.py @@ -400,7 +400,10 @@ def do_token_auth(self, auth_loc_str, creds=False): if resp.status != 200: raise ValueError('Bad response getting token: %d', resp.status) - if resp.getheader('content-type') != 'application/json': + # The json content type can include a extra bit defining the character set + # so we just check the beginning. Worst case is the json.loads will throw + # an error just after this. + if not resp.getheader('content-type').startswith('application/json'): raise ValueError('Invalid response getting token, not json') auth_resp = json.loads(resp.read()) diff --git a/imagegw/shifter_imagegw/imageworker.py b/imagegw/shifter_imagegw/imageworker.py index 22186a4a..fbb30b12 100644 --- a/imagegw/shifter_imagegw/imageworker.py +++ b/imagegw/shifter_imagegw/imageworker.py @@ -468,7 +468,7 @@ def pull(request, updater, testmode=0): try: # Step 1 - Do the pull updater.update_status('PULLING', 'PULLING') - logging.info(request) + logging.debug(request) if not pull_image(request, updater=updater): logging.info("Worker: Pull failed") raise OSError('Pull failed')