Can no longer include space between 'header-name:' and value

Bug #1614280 reported by Tim Burke
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-swiftclient
Fix Released
Medium
venkatamahesh

Bug Description

Previously, you could specify additional headers with a command-line like

 swift post -H 'X-Storage-Policy: EC' container

But that now results in an error like

 Invalid return character or leading space in header: x-storage-policy

We can work around this by either downgrading requests to 2.10 or removing the space so it looks like

 swift post -H 'X-Storage-Policy:EC' container

Both of those options suck; we should just .strip() the header when we're parsing it.

Revision history for this message
clayg (clay-gerrard) wrote :

nowhey! new requests is mean!? Where's the major version bump new requests?! huh!?

vagrant@saio:~$ pip freeze | grep requests
requests==2.10.0
vagrant@saio:~$ sudo pip install --upgrade requests
Collecting requests
  Downloading requests-2.11.1-py2.py3-none-any.whl (514kB)
    100% |████████████████████████████████| 522kB 2.0MB/s
Installing collected packages: requests
  Found existing installation: requests 2.10.0
    Uninstalling requests-2.10.0:
      Successfully uninstalled requests-2.10.0
Successfully installed requests-2.11.1
vagrant@saio:~$ swift post monkies2 -H 'x-storage-policy: ec'
Invalid return character or leading space in header: x-storage-policy

Changed in python-swiftclient:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
clayg (clay-gerrard) wrote :
Changed in python-swiftclient:
assignee: nobody → venkatamahesh (venkatamaheshkotha)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-swiftclient (master)

Reviewed: https://review.openstack.org/356802
Committed: https://git.openstack.org/cgit/openstack/python-swiftclient/commit/?id=8fbe118cea8804fe29529a27f3937af412b47fb7
Submitter: Jenkins
Branch: master

commit 8fbe118cea8804fe29529a27f3937af412b47fb7
Author: Tim Burke <email address hidden>
Date: Wed Aug 17 16:01:23 2016 -0700

    Strip leading/trailing whitespace from headers

    New versions of requests will raise an InvalidHeader error otherwise.

    Change-Id: Idf3bcd8ac359bdda9a847bf99a78988943374134
    Closes-Bug: #1614280
    Closes-Bug: #1613814

Changed in python-swiftclient:
status: Confirmed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-swiftclient 3.1.0

This issue was fixed in the openstack/python-swiftclient 3.1.0 release.

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.