Set the Content-Length on a HEAD requests

We get it as part of the Redis metadata

RFC: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
This commit is contained in:
Greg Karékinian
2018-05-22 12:44:24 +02:00
parent 28f003c20b
commit b4ad4c4793
2 changed files with 2 additions and 0 deletions

View File

@@ -47,6 +47,7 @@ module RemoteStorage
server.headers["ETag"] = %Q("#{metadata["e"]}")
server.headers["Last-Modified"] = Time.at(metadata["m"].to_i / 1000).httpdate
server.headers["Content-Type"] = metadata["t"]
server.headers["Content-Length"] = metadata["s"]
if none_match.include? %Q("#{metadata["e"]}")
server.halt 304