identity_headers are being ignored

Bug #1394965 reported by Flavio Percoco
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
High
Flavio Percoco

Bug Description

Change I09f70eee3e2777f52ce040296015d41649c2586a, introduced a bug where the identity_headers are not added to the request headers anymore causing the former to be completely ignored and useless.

- if self.identity_headers:
- for k, v in six.iteritems(self.identity_headers):
- kwargs['headers'].setdefault(k, v)
+ data = kwargs.pop("data", None)
+ if data is not None and not isinstance(data, six.string_types):
+ try:
+ data = json.dumps(data)
+ content_type = 'application/json'
+ except TypeError:
+ # Here we assume it's
+ # a file-like object
+ # and we'll chunk it
+ data = chunk_body(data)

Review: https://review.openstack.org/#/c/78269/

Changed in python-glanceclient:
importance: Undecided → High
assignee: nobody → Flavio Percoco (flaper87)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/136326

Changed in python-glanceclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (master)

Reviewed: https://review.openstack.org/136326
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=5080d100999b17e86b62d463474affe2a4f1ed05
Submitter: Jenkins
Branch: master

commit 5080d100999b17e86b62d463474affe2a4f1ed05
Author: Flavio Percoco <email address hidden>
Date: Fri Nov 21 13:55:43 2014 +0100

    Send `identity_headers` through the wire

    Change I09f70eee3e2777f52ce040296015d41649c2586a, introduced a bug where
    the identity_headers are not added to the request headers anymore
    causing the former to be completely ignored and useless.

    This patch fixes that issue by restoring the previous code. A new test
    has been added to avoid regressions.

    Closes-bug: #1394965
    Change-Id: I1b1633636448398cf3f41217f1d671b43ebd9946

Changed in python-glanceclient:
status: In Progress → Fix Committed
Changed in python-glanceclient:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.