Uploaded image for project: 'Libcloud'
  1. Libcloud
  2. LIBCLOUD-256

Content-length header causes httplib exception in VCloudConnection

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.11.2
    • Fix Version/s: 0.12.1
    • Component/s: Compute
    • Labels:
      None
    • Environment:

      Centos 5.8, python 2.7,

      Description

      _get_auth_headers in VCloudConnnection raises and exception due to an integer 0 set as the Content-Length. The issues is resolved by setting the Content-Length to a string '0'.

        Activity

        Hide
        kami Tomaz Muraus added a comment -

        Thanks for the report and fix.

        There was another occurrence where a number instead of a string was used for a header value inside this file. Fix has been merged into trunk - http://svn.apache.org/viewvc?view=revision&revision=1407664

        Show
        kami Tomaz Muraus added a comment - Thanks for the report and fix. There was another occurrence where a number instead of a string was used for a header value inside this file. Fix has been merged into trunk - http://svn.apache.org/viewvc?view=revision&revision=1407664
        Hide
        bdegeeter Brian DeGeeter added a comment -

        +++ b/libcloud/compute/drivers/vcloud.py
        @@ -325,7 +325,7 @@ class VCloudConnection(ConnectionUserAndKey):
        return

        { 'Authorization': "Basic %s" % base64.b64encode( b('%s:%s' % (self.user_id, self.key))).decode('utf-8'), - 'Content-Length': 0, + 'Content-Length': '0', 'Accept': 'application/*+xml' }
        Show
        bdegeeter Brian DeGeeter added a comment - +++ b/libcloud/compute/drivers/vcloud.py @@ -325,7 +325,7 @@ class VCloudConnection(ConnectionUserAndKey): return { 'Authorization': "Basic %s" % base64.b64encode( b('%s:%s' % (self.user_id, self.key))).decode('utf-8'), - 'Content-Length': 0, + 'Content-Length': '0', 'Accept': 'application/*+xml' }

          People

          • Assignee:
            kami Tomaz Muraus
            Reporter:
            bdegeeter Brian DeGeeter
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1m
              1m
              Remaining:
              Remaining Estimate - 1m
              1m
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development