Tihomir Trifonov 8b42f8a40c Force utf-8 encode of HTTPConnection params
This patch forces swiftclient to encode to utf-8
all url and headers arguments, to avoid the
UnicodeDecodeError which is raised by '\r\n'.join([])
invoked in htplib.py.

Currently the affected projects are Horizon(upload file
with unicode name) and swiftclient CLI('swift post' with
unicode filename as header)

This is also a follow-up of this review:
    https://review.openstack.org/#/c/14216/

I'd still want to hear what the Swift core devs
think of it. Is it better to create a new
AutoEncodingHTTPConnection? Or to handle the connection
creation and make sure there are no unicode and utf-8
string at the same time. If these unicode checks have to
be added in the calling code(Dashboard, CLI), there are
so many places to be added, and also in all new commands
that might be exposed from the API.

Fixes bug 1008940

Change-Id: Ice2aa29024429d3e6f569a88d5cf8b4202537827
2012-11-02 21:33:32 +02:00
2012-08-29 13:43:15 +08:00
2012-06-26 21:23:25 -05:00
2012-05-08 16:30:13 +01:00
2012-06-26 21:23:25 -05:00
2012-05-08 15:21:56 +01:00
2012-05-21 12:52:55 +02:00
2012-06-11 14:51:40 -07:00

Python bindings to the OpenStack Object Storage API

This is a python client for the Swift API. There's a Python API (the swiftclient module), and a command-line script (swift).

Development takes place via the usual OpenStack processes as outlined in the OpenStack wiki. The master repository is on GitHub.

This code is based on original the client previously included with OpenStack's swift The python-swiftclient is licensed under the Apache License like the rest of OpenStack.

Contents:

Description
OpenStack Storage (Swift) Client
Readme 14 MiB
Languages
Python 99.9%
Shell 0.1%