swift client does not allow content type to be specified

Bug #1154621 reported by Tong Li
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
python-swiftclient
Fix Released
Wishlist
Tong Li

Bug Description

Currently the swift client does not allow specify content type when upload an object. In many cases the client code guess it wrong.
There needs to be an option to allow client to specify content type during the upload of an object

Revision history for this message
Ryan Goltry (ryan-goltry) wrote :

When uploading binary files using the swift client, the content type is being detected as application/octet-stream. For large files, 5 GB and above, this has a very negative impact on the download speed since it is pulled with a base64 encoding bloating the network traffic. Being able to set the content-type at upload time with the swift client would address this.

Changed in python-swiftclient:
status: New → Triaged
importance: Undecided → Medium
importance: Medium → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-swiftclient (master)

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

Changed in python-swiftclient:
assignee: nobody → Tong Li (litong01)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-swiftclient (master)

Reviewed: https://review.openstack.org/24474
Committed: http://github.com/openstack/python-swiftclient/commit/48f446a93883fc615d23ac1148fd4b082aed9c86
Submitter: Jenkins
Branch: master

commit 48f446a93883fc615d23ac1148fd4b082aed9c86
Author: tong li <email address hidden>
Date: Mon Mar 18 09:47:59 2013 -0400

    Allow user to specify headers at the command line.

    Currently swift client does not allow content type to be specified
    when upload an object. It does not allow a user to change content
    type neither. This patch will allow a user to specify content
    type by using upload command or modify the content type by using
    post command.

    For example:
    1. To upload an object with specific content type:
    swift upload -H content-type:applicaiton/xml con1 file1

    2. To modify an object to a specific content type:
    swift post -H content-type:application/josn con1 file1

    This patch also allow a client to specify other request headers.

    Change-Id: I12db83a1d465285e0906889cc67dfaa44e059568
    Fixes: bug #1154621

Changed in python-swiftclient:
status: In Progress → Fix Committed
Changed in python-swiftclient:
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.