Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1176181

Summary: headers with different cases are not merged
Product: Red Hat OpenStack Reporter: hguemar
Component: python-requestsAssignee: hguemar
Status: CLOSED ERRATA QA Contact: Ami Jeain <ajeain>
Severity: high Docs Contact:
Priority: high    
Version: 5.0 (RHEL 6)CC: ajeain, apevec, jdurgin, jgalvez, lhh, scohen, ssainkar, yeylon
Target Milestone: z4Keywords: Rebase, ZStream
Target Release: 5.0 (RHEL 6)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-requests-2.3.0-1.el6 Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
In the previous version, python-requests had issues including incorrect HTTP headers’ generation, causing errors with python-swiftclient. This was due to python-requests having an incorrect implementation of a case insensitive mapping. With this release, case insensitive dictionary (CaseInsensitiveDict) has been updated which has fixed all issues with python-swiftclient.
Story Points: ---
Clone Of: 1169530
: 1183150 (view as bug list) Environment:
Last Closed: 2015-04-16 14:37:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1169530, 1176186, 1202548, 1206465, 1232881    
Bug Blocks: 1135135, 1183150, 1199249    

Comment 1 Lon Hohberger 2014-12-19 16:01:50 UTC
+++ This bug was initially created as a clone of Bug #1169530 +++

Description of problem:

The high-level problem is https://bugzilla.redhat.com/show_bug.cgi?id=1135135

The root cause is python-requests having a buggy implementation of a case
insensitive mapping. When swiftclient adds a 'Content-Length' header and requests implicitly adds a 'content-length' header, requests sends both as separate headers. This causes apache to reject the request with a 400 error.

Version-Release number of selected component (if applicable):

python-requests-1.1.0-8.1.el7ost

How reproducible:

always

Steps to Reproduce:

Run this testcase:
https://github.com/kennethreitz/requests/blob/f7596c75dce4e87ab83bdf74e8f120a4b1a5ff03/test_requests.py#L514

Additional info:

This was fixed upstream in https://github.com/kennethreitz/requests/issues/649
The fix as a patch against the current package is attached.

--- Additional comment from Lon Hohberger on 2014-12-19 10:32:31 EST ---

python-requests-2.3.0-3.el7ost is in RHEL OSP 6 beta.

--- Additional comment from Lon Hohberger on 2014-12-19 10:39:25 EST ---

It's probable that rebasing to python-requests 2.3.0 is how we should fix this; this was addressed in commit f7596c75 of upstream master.

Comment 2 hguemar 2015-03-03 16:33:48 UTC
Fixed in LPC

Comment 6 errata-xmlrpc 2015-04-16 14:37:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0820.html