libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Metzler (JIRA)" <>
Subject [jira] [Commented] (LIBCLOUD-552) CloudFiles CURL Request uses -X HEAD instead of --head or -I
Date Sat, 10 May 2014 21:58:40 GMT


Brian Metzler commented on LIBCLOUD-552:

Verified that using -X HEAD with curl, breaks compatibility with Objects with spaces in the

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/libcloud/storage/", line 163, in download_object
  File "/usr/local/lib/python2.7/dist-packages/libcloud/storage/drivers/", line
372, in download_object
  File "/usr/local/lib/python2.7/dist-packages/libcloud/storage/", line 502, in _get_object
libcloud.common.types.LibcloudError: <LibcloudError in <
object at 0x2d49fd0> 'Unexpected status code: 400'>

Just upload a file into a container with a space in the name, then try to download it.  When
attempting to pull the metadata, curl does not know just to pull the header information with
-X HEAD, and attempts to pull the full file.  With --head (-I), this is not the case, and
works properly.

> CloudFiles CURL Request uses -X HEAD instead of --head or -I
> ------------------------------------------------------------
>                 Key: LIBCLOUD-552
>                 URL:
>             Project: Libcloud
>          Issue Type: Improvement
>          Components: Storage
>    Affects Versions: 0.14.0-beta3
>         Environment: Ubuntu 12.04.4 LTS
> curl 7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/ libidn/1.23
> Python 2.7.3 and Python 3.2.3
>            Reporter: Brian Metzler
>            Priority: Critical
> When running driver.container.download_object(), it attempts to get the metadata of the
object by using 'curl -X HEAD', instead of 'curl -I' or 'curl --head'.  curl does not properly
handle HEAD requests with -X HEAD, as it still attempts to download the full file.
> Just turn on debugging, and check out the time it takes for a standard curl -I versus
curl -X HEAD.

This message was sent by Atlassian JIRA

View raw message