Skip to content

Commit

Permalink
Use X-Object-Manifest instead of X-Object-Meta-Manifest when creating…
Browse files Browse the repository at this point in the history
… DLO

This fixes 0-byte content when GETting Dynamic Large Objects (multipart files) created by pyrax from Rackspace Cloud Files (pycontribs#258).
  • Loading branch information
Francis Devereux committed Dec 10, 2013
1 parent 0ffa2dc commit 055a4af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyrax/cf_wrapper/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ def upload(fileobj, content_type, etag, headers):
etag=etag, headers=headers,
response_dict=extra_info)
# Upload the manifest
headers["X-Object-Meta-Manifest"] = "%s." % obj_name
headers["X-Object-Manifest"] = "%s." % obj_name
return self.connection.put_object(cont.name, obj_name,
contents=None, headers=headers,
response_dict=extra_info)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_cf_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ def test_upload_large_file_from_file_object_with_obj_name(self):
self.assertEqual(put_calls[0][1][1], '%s.1' % obj_name)
self.assertEqual(put_calls[1][1][1], '%s.2' % obj_name)
self.assertEqual(put_calls[2][1][1], obj_name)
self.assertEqual(put_calls[2][2]["headers"]["X-Object-Meta-Manifest"],
self.assertEqual(put_calls[2][2]["headers"]["X-Object-Manifest"],
obj_name + ".")

# get_object() should be called with the same name that was passed
Expand Down

0 comments on commit 055a4af

Please sign in to comment.