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

Fix response status for mocks.

This commit is contained in:
Rupak Ganguly 2012-10-17 15:02:42 -04:00
parent 6679654b70
commit 5e5bdd08c1
2 changed files with 3 additions and 1 deletions

View file

@ -30,6 +30,7 @@ module Fog
def head_container(container_name)
response = get_container(container_name)
response.body = nil
response.status = 204
response
end

View file

@ -11,7 +11,7 @@ module Fog
#
def head_object(container, object)
response = request({
:expects => 200,
:expects => 200, # should be 204
:method => 'HEAD',
:path => "#{Fog::HP.escape(container)}/#{Fog::HP.escape(object)}"
}, false)
@ -25,6 +25,7 @@ module Fog
def head_object(container_name, object_name, options = {})
response = get_object(container_name, object_name, options)
response.body = nil
response.status = 200 # should be 204
response
end