You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by "Tomaz Muraus (JIRA)" <ji...@apache.org> on 2013/12/18 13:46:09 UTC

[jira] [Commented] (LIBCLOUD-458) Use HTTPS CDN URIs for Rackspace Cloud Files

    [ https://issues.apache.org/jira/browse/LIBCLOUD-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13851654#comment-13851654 ] 

Tomaz Muraus commented on LIBCLOUD-458:
---------------------------------------

Yes, you are correct, this one needs a bit more thought and work.

We have a couple of different options here.

1. Add "secure" / "https" argument to the existing *get_container_cdn_url* and *get_object_cdn_url method*

2. Add a new set of methods - *get_container_secure/https_cdn_url* and *get_object_secure/https_cdn_url*.

I'm kinda leaning towards #1. The problem with #1 is that because of the nature of Python (dynamic typing, we don't use zope.interface or similar) is hard to enforce that everyone will implement it correctly which means throwing an exception if the provider doesn't support returning an https URL.

> Use HTTPS CDN URIs for Rackspace Cloud Files
> --------------------------------------------
>
>                 Key: LIBCLOUD-458
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-458
>             Project: Libcloud
>          Issue Type: Improvement
>          Components: Storage
>    Affects Versions: 0.14.0-beta3
>            Reporter: Michael Farrell
>
> I found another patch in my collection, where I had patched the Rackspace storage driver to use the HTTPS CDN URI.
> I'm unsure if it may be best to have this as an option for storage drivers, but if this option is added, it will also need to be implemented for the other storage drivers.  I would like some advice on this.
> The patch that hard codes it to use HTTPS URIs always for the CDN, as a 1-line change (ie: without the settings proposed above):
> {code}
> -------------------- libcloud/storage/drivers/cloudfiles.py --------------------
> index 1502a33..6e7f931 100644
> @@ -273,7 +273,7 @@ class CloudFilesStorageDriver(StorageDriver, OpenStackDriverMixin):
>                                             cdn_request=True)
>  
>          if response.status == httplib.NO_CONTENT:
> -            cdn_url = response.headers['x-cdn-uri']
> +            cdn_url = response.headers['x-cdn-ssl-uri']
>              return cdn_url
>          elif response.status == httplib.NOT_FOUND:
>              raise ContainerDoesNotExistError(value='',
> {code}



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