You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/07/14 00:57:04 UTC

[jira] [Commented] (LIBCLOUD-721) raw connections don't work with HTTP proxies

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

ASF GitHub Bot commented on LIBCLOUD-721:
-----------------------------------------

GitHub user nferch opened a pull request:

    https://github.com/apache/libcloud/pull/547

    [LIBCLOUD-721] work around http proxy for raw requests

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nferch/libcloud master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/libcloud/pull/547.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #547
    
----
commit 4833b39e8e863c1c13f14c5acd857afef4f0850d
Author: Nathan Ferch <nf...@spotify.com>
Date:   2015-07-13T22:16:19Z

    work around http proxy for raw requests

----


> raw connections don't work with HTTP proxies
> --------------------------------------------
>
>                 Key: LIBCLOUD-721
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-721
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Storage
>            Reporter: Nathan A. Ferch
>            Priority: Minor
>
> libcloud seems to have issues when using an HTTP proxy. This bug is triggered by the StorageDriver _upload_object method's use of raw=True.
> {noformat}
>   File "/home/nf/work/spotify-gceimage/.tox/py27/local/lib/python2.7/site-packages/libcloud/storage/drivers/s3.py", line 448, in upload_object
>     storage_class=ex_storage_class)
>   File "/home/nf/work/spotify-gceimage/.tox/py27/local/lib/python2.7/site-packages/libcloud/storage/drivers/s3.py", line 836, in _put_object
>     headers = response.headers
>   File "/home/nf/work/spotify-gceimage/.tox/py27/local/lib/python2.7/site-packages/libcloud/common/base.py", line 253, in headers
>     self._headers = lowercase_keys(dict(self.response.getheaders()))
>   File "/home/nf/work/spotify-gceimage/.tox/py27/local/lib/python2.7/site-packages/libcloud/common/base.py", line 241, in response
>     self.parse_error()
>   File "/home/nf/work/spotify-gceimage/.tox/py27/local/lib/python2.7/site-packages/libcloud/storage/drivers/s3.py", line 87, in parse_error
>     driver=S3StorageDriver)
> libcloud.common.types.LibcloudError: <LibcloudError in <class 'libcloud.storage.drivers.s3.S3StorageDriver'> 'Unknown error. Status code: 503'>
> {noformat}
> Closer examination of the response reveals that the request is being sent with the host/port of the proxy server, not the destination:
> {request}
> <p>The following error was encountered while trying to retrieve the URL: <a href="https://127.0.0.1:3128/spotify-gceimage-employeegameday/test-spotify-gceimage-trusty-20150713-1801-review-build-55.tar.gz">https://127.0.0.1:3128/spotify-gceimage-employeegameday/tes
> t-spotify-gceimage-trusty-20150713-1801-review-build-55.tar.gz</a></p>
> {request}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)