Set Last-Modified header
This commit is contained in:
parent
1cd01b8277
commit
af28ec44c8
@ -30,6 +30,7 @@ module RemoteStorage
|
||||
def get_data(user, category, key)
|
||||
object = data_bucket.get("#{user}:#{category}:#{key}")
|
||||
headers["Content-Type"] = object.content_type
|
||||
headers["Last-Modified"] = object.last_modified.to_s(:rfc822)
|
||||
case object.content_type
|
||||
when "application/json"
|
||||
return object.data.to_json
|
||||
|
@ -38,6 +38,8 @@ describe "Permissions" do
|
||||
|
||||
last_response.status.must_equal 200
|
||||
last_response.body.must_equal "some text data"
|
||||
|
||||
last_response.headers["Last-Modified"].wont_be_nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user