1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[openstack|storage] patch #delete_static_large_object for Swift v1.8

This commit addresses an issue where the Content-Type header is not
being set correctly in the response. This has been fixed in Swift v1.9.
openstack/swift@ad24cde120
This commit is contained in:
Brian D. Burns 2013-07-28 21:49:47 -04:00
parent 56c28d2cb2
commit 65a88e4af0

View file

@ -25,13 +25,16 @@ module Fog
#
# @see http://docs.openstack.org/api/openstack-object-storage/1.0/content/static-large-objects.html
def delete_static_large_object(container, object, options = {})
request(
response = request({
:expects => 200,
:method => 'DELETE',
:headers => options.merge('Content-Type' => 'text/plain'),
:headers => options.merge('Content-Type' => 'text/plain',
'Accept' => 'application/json'),
:path => "#{Fog::OpenStack.escape(container)}/#{Fog::OpenStack.escape(object)}",
:query => { 'multipart-manifest' => 'delete' }
)
}, false)
response.body = Fog::JSON.decode(response.body)
response
end
end