From 2e55095f6fc1ec2799bbdfd1143d487d2de1d7a3 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 17 Feb 2007 18:16:44 +0000 Subject: Added that rendering will automatically insert the etag header on 200 OK responses. The etag is calculated using MD5 of the response body. If a request comes in that has a matching etag, the response will be changed to a 304 Not Modified and the response body will be set to an empty string. [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6158 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/request.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'actionpack/lib/action_controller/request.rb') diff --git a/actionpack/lib/action_controller/request.rb b/actionpack/lib/action_controller/request.rb index 9f75b32f06..cb5a95b4e1 100755 --- a/actionpack/lib/action_controller/request.rb +++ b/actionpack/lib/action_controller/request.rb @@ -51,6 +51,10 @@ module ActionController @env['REQUEST_METHOD'].downcase.to_sym == :head end + def headers + @env + end + # Determine whether the body of a HTTP call is URL-encoded (default) # or matches one of the registered param_parsers. # -- cgit v1.2.3