From dc87eba0628f88775e999cdefca945683c52e740 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 1 Apr 2006 20:41:53 +0000 Subject: [PATCH] Fixed fragment caching of binary data on Windows (closes #4493) [bellis@deepthought.org] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4125 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 2 ++ actionpack/lib/action_controller/caching.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 61eb7c20cfda2..fb58a0a761aa0 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fixed fragment caching of binary data on Windows #4493 [bellis@deepthought.org] + * Applied Prototype $() performance patches (#4465, #4477) and updated script.aculo.us [Sam Stephenson, Thomas Fuchs] * Added automated timestamping to AssetTagHelper methods for stylesheets, javascripts, and images when Action Controller is run under Rails [DHH]. Example: diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index a2259de46b868..0cb70c865afcf 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -416,7 +416,7 @@ def write(name, value, options = nil) #:nodoc: end def read(name, options = nil) #:nodoc: - IO.read(real_file_path(name)) rescue nil + File.open(real_file_path(name), 'rb') { |f| f.read } rescue nil end def delete(name, options) #:nodoc: