libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomaz Muraus (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LIBCLOUD-433) libcloud throws an exception when content-type is not supplied and it cannot guess the content type successfully
Date Mon, 09 Dec 2013 14:34:07 GMT

     [ https://issues.apache.org/jira/browse/LIBCLOUD-433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tomaz Muraus resolved LIBCLOUD-433.
-----------------------------------

    Resolution: Fixed

As noted in the pull request (https://github.com/apache/libcloud/pull/183#issuecomment-30136049),
changes have been merged.

Thanks!

> libcloud throws an exception when content-type is not supplied and it cannot guess the
content type successfully
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: LIBCLOUD-433
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-433
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Storage
>    Affects Versions: 0.13.2
>            Reporter: Michael Farrell
>
> Whenever uploading a file using libcloud, it will throw an exception if there is no content-type
specified and it cannot guess the content-type from the file extension.
> Somewhere along the line of django-randomfilenamestorage, django-storages and libcloud
(I suspect in django-storages), the content-type of the file will be stripped if the browser
passes a content-type on an uploaded file of application/octet-stream.
> When this lands in libcloud.storage.base.StorageDriver._upload_object, libcloud attempts
to guess the file's content-type from it's extension if none is supplied.  When this fails,
an AttributeError is raised.
> Instead of throwing an exception, why not send the content-type of unknown bytestreams:
application/octet-stream.
> Patch is incoming.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Mime
View raw message