glance --version : 2.5.0 File: common/http.py Class: _BaseHTTPClient Method: _set_common_request_kwargs Python version: 3.4
First problem ------------- There is a line of code in this method that fetches the Content-Type header from the passed-in headers dict: content_type = headers.get('content-type', 'application/octet-stream') However it fails because the headers dict has strings that are not represented as unicode: (Pdb) print(headers) {b'Content-Type': b'application/openstack-images-v2.1-json-patch'} Therefore the lookup fails: (Pdb) print(headers.get("Content-Type")) None But if we use a key that is coerced to the right type, it works: (Pdb) print(headers.get(b"Content-Type")) b'application/openstack-images-v2.1-json-patch' The question I have yet to answer is: are these strings supposed to be char sequences, or did they get converted by mistake due to a different bug? That's really the first thing to figure out. Second problem -------------- The headers.get() call gets the case wrong. It should be Content-Type, but instead it uses content-type. Path to fix ----------- I would be happy to fix this. This would be my first upstream contribution, and I know there is a process to even get to square one. Should I start down that path, or does someone else wish to address this bug? Sincerely, Carlos Konstanski __________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev