diff options
| author | Pratik Naik <pratiknaik@gmail.com> | 2008-12-16 12:05:27 +0000 |
|---|---|---|
| committer | Pratik Naik <pratiknaik@gmail.com> | 2008-12-16 12:05:27 +0000 |
| commit | ce0e2084107a20a773a587335cfe54bf70ade795 (patch) | |
| tree | fded8e2f6a2d459bdd4676bb9646d3b54cc9f3fe /actionpack/lib/action_controller/response.rb | |
| parent | 016fffff6d6e434ee7fa69531b08b07d99f48583 (diff) | |
| parent | 9e2b4a10f7f091868b3c3701efb4c04048455706 (diff) | |
| download | rails-ce0e2084107a20a773a587335cfe54bf70ade795.tar.gz rails-ce0e2084107a20a773a587335cfe54bf70ade795.tar.bz2 rails-ce0e2084107a20a773a587335cfe54bf70ade795.zip | |
Merge commit 'mainstream/master'
Diffstat (limited to 'actionpack/lib/action_controller/response.rb')
| -rw-r--r-- | actionpack/lib/action_controller/response.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/response.rb b/actionpack/lib/action_controller/response.rb index 559c38efd0..4c37f09215 100644 --- a/actionpack/lib/action_controller/response.rb +++ b/actionpack/lib/action_controller/response.rb @@ -115,7 +115,11 @@ module ActionController # :nodoc: end def etag=(etag) - headers['ETag'] = %("#{Digest::MD5.hexdigest(ActiveSupport::Cache.expand_cache_key(etag))}") + if etag.blank? + headers.delete('ETag') + else + headers['ETag'] = %("#{Digest::MD5.hexdigest(ActiveSupport::Cache.expand_cache_key(etag))}") + end end def redirect(url, status) |
