diff --git a/lib/remote_storage/riak.rb b/lib/remote_storage/riak.rb index de9014a..f3222b1 100644 --- a/lib/remote_storage/riak.rb +++ b/lib/remote_storage/riak.rb @@ -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 diff --git a/spec/permissions_spec.rb b/spec/permissions_spec.rb index fc932f3..a8d370e 100644 --- a/spec/permissions_spec.rb +++ b/spec/permissions_spec.rb @@ -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