Always cast the Content-Length header into a string

Fixes a crash in Rainbows, when a header is set to a Fixnum/Integer.

Refs #53
This commit is contained in:
Greg Karékinian
2015-03-13 11:17:42 +01:00
parent 247559e563
commit 0f1f445e7f
2 changed files with 3 additions and 3 deletions

View File

@@ -168,7 +168,7 @@ module RemoteStorage
def set_object_response_headers(object)
server.headers["Content-Type"] = object.content_type
server.headers["ETag"] = object.etag
server.headers["Content-Length"] = object_size(object)
server.headers["Content-Length"] = object_size(object).to_s
end
def set_directory_response_headers(directory_object)