about summary refs log tree commit homepage
path: root/lib/mongrel/handlers.rb
diff options
context:
space:
mode:
authorzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-05-13 21:25:53 +0000
committerzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-05-13 21:25:53 +0000
commit429ebcd5dfbdc54c239fa9425048119026fe9bef (patch)
tree443199f961579a561f6e19c03fa7e99fec4a0fff /lib/mongrel/handlers.rb
parent07dd2b47830cb6b1a2bcbc4d0b3f1b621019fb97 (diff)
downloadunicorn-429ebcd5dfbdc54c239fa9425048119026fe9bef.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@173 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'lib/mongrel/handlers.rb')
-rw-r--r--lib/mongrel/handlers.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/mongrel/handlers.rb b/lib/mongrel/handlers.rb
index de328b7..d71e151 100644
--- a/lib/mongrel/handlers.rb
+++ b/lib/mongrel/handlers.rb
@@ -179,14 +179,15 @@ module Mongrel
         else unmodified_since || none_match  # validation successful if we get this far and at least one of the header exists
       end
 
+      header = response.header
+      header[Const::ETAG] = etag
+
       if same_response
         response.start(304) {}
       else
         # first we setup the headers and status then we do a very fast send on the socket directly
         response.status = 200
-        header = response.header
         header[Const::LAST_MODIFIED] = mtime.httpdate
-        header[Const::ETAG] = etag
 
         # set the mime type from our map based on the ending
         dot_at = req_path.rindex('.')