libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [libcloud] mspagon opened a new issue #1487: GET request causes HTTP 400 error (OpenStack & potentially other providers)
Date Wed, 09 Sep 2020 18:50:26 GMT

mspagon opened a new issue #1487:
URL: https://github.com/apache/libcloud/issues/1487


   ## Summary
   
   **HTTP 400 errors** are appearing in the logs of our **OpenStack server**:  `ERROR WSGI:
code 400, Bad request syntax ('0')`.
   
   They appear when sending a GET request.
   
   ## Wireshark
   
   ![image](https://user-images.githubusercontent.com/5027451/92638975-ca3e6f80-f2a0-11ea-81ed-215407d7c28c.png)
   
   ## Detailed Information
   
   **Libcloud version:** v3.0.0
   **OS:** Ubuntu 14.04.6 LTS
   **Provider:** OpenStack Swift
   **Service:** Storage
   
   ## Reproducing
   
   I'm not sure how to reproduce this without access to an Openstack server along with the
server logs/wireshark to examine the HTTP error.  But I would recommend just making a download
request.
   
   I traced down the bug to a single-line of code and in a subsequent post will isolate the
reason and illustrate the behavior.
   
   ```from libcloud.storage.types import Provider
   from libcloud.storage.providers import get_driver
   
   import libcloud.security
   libcloud.security.VERIFY_SSL_CERT = False
   
   if __name__ == '__main__':
       cls = get_driver(Provider.OPENSTACK_SWIFT)
   
       driver = cls('<USER>', '<PASSWORD>',
                    ex_force_auth_url='http://10.110.5.30/auth/v1.0',
                    ex_force_auth_version='1.0',
                    ex_force_service_name='cloudFiles',
                    ex_force_service_type='object-store')
   
       container = driver.get_container('bucket01')
   
       # Get the object
       object = driver.get_object('bucket01', 'test-file.txt')
   
       # Download object as stream.
       for chunk in driver.download_object_as_stream(object):
           print(chunk)
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message