Commits

John Dickinson committed 67d667d Merge

Merge pull request #47 from reidrac/utf_copy_to_from

quote headers in copy_to and copy_from to support unicode strings

  • Participants
  • Parent commits 3baa0e4, 40112da

Comments (0)

Files changed (1)

File cloudfiles/storage_object.py

             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='')