提交 964b2826 编写于 作者: A arvida

Added accessor methods for Date header

上级 bb4a7937
......@@ -56,6 +56,20 @@ def last_modified=(utc_time)
headers['Last-Modified'] = utc_time.httpdate
end
def date
if date_header = headers['Date']
Time.httpdate(date_header)
end
end
def date?
headers.include?('Date')
end
def date=(utc_time)
headers['Date'] = utc_time.httpdate
end
def etag=(etag)
key = ActiveSupport::Cache.expand_cache_key(etag)
@etag = self["ETag"] = %("#{Digest::MD5.hexdigest(key)}")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册