1. Lincoln Loop
  2. Untitled project
  3. python-cloudfiles

Commits

Juan Martínez  committed 40112da

quote headers in copy_to and copy_from to support unicode strings

  • Participants
  • Parent commits 87d0fb0
  • Branches master

Comments (0)

Files changed (1)

File cloudfiles/storage_object.py

View file
             self._etag = None
 
         headers = self._make_headers()
-        headers['Destination'] = "%s/%s" % (container_name, name)
+        headers['Destination'] = quote("%s/%s" % (container_name, name))
         headers['Content-Length'] = 0
         response = self.container.conn.make_request(
                    'COPY', [self.container.name, self.name], hdrs=headers, data='')
             self._etag = None
 
         headers = self._make_headers()
-        headers['X-Copy-From'] = "%s/%s" % (container_name, name)
+        headers['X-Copy-From'] = quote("%s/%s" % (container_name, name))
         headers['Content-Length'] = 0
         response = self.container.conn.make_request(
                    'PUT', [self.container.name, self.name], hdrs=headers, data='')