Merge branch 'fix_content_length_header'
This commit is contained in:
commit
c851ab92ac
@ -168,7 +168,7 @@ module RemoteStorage
|
|||||||
def set_object_response_headers(object)
|
def set_object_response_headers(object)
|
||||||
server.headers["Content-Type"] = object.content_type
|
server.headers["Content-Type"] = object.content_type
|
||||||
server.headers["ETag"] = object.etag
|
server.headers["ETag"] = object.etag
|
||||||
server.headers["Content-Length"] = object_size(object)
|
server.headers["Content-Length"] = object_size(object).to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_directory_response_headers(directory_object)
|
def set_directory_response_headers(directory_object)
|
||||||
|
@ -29,7 +29,7 @@ describe "App with Riak backend" do
|
|||||||
|
|
||||||
it "has a Content-Length header set" do
|
it "has a Content-Length header set" do
|
||||||
last_response.status.must_equal 200
|
last_response.status.must_equal 200
|
||||||
last_response.headers["Content-Length"].must_equal 14
|
last_response.headers["Content-Length"].must_equal '14'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ describe "App with Riak backend" do
|
|||||||
|
|
||||||
it "has a Content-Length header set" do
|
it "has a Content-Length header set" do
|
||||||
last_response.status.must_equal 200
|
last_response.status.must_equal 200
|
||||||
last_response.headers["Content-Length"].must_equal 22
|
last_response.headers["Content-Length"].must_equal '22'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user