diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/caching.rb | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 7ee50b326f..dcf160414f 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Make cacheing binary files friendly with Windows. #1975. [Rich Olson] + * Convert boolean form options form the tag_helper. #809. [Michael Schuerig <michael@schuerig.de>] * Fixed that an instance variable with the same name as a partial should be implicitly passed as the partial :object #2269 [court3nay] diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index d31343dd71..7afdef135d 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -86,7 +86,7 @@ module ActionController #:nodoc: benchmark "Cached page: #{page_cache_file(path)}" do FileUtils.makedirs(File.dirname(page_cache_path(path))) - File.open(page_cache_path(path), "w+") { |f| f.write(content) } + File.open(page_cache_path(path), "wb+") { |f| f.write(content) } end end @@ -407,7 +407,7 @@ module ActionController #:nodoc: def write(name, value, options = nil) #:nodoc: ensure_cache_path(File.dirname(real_file_path(name))) - File.open(real_file_path(name), "w+") { |f| f.write(value) } + File.open(real_file_path(name), "wb+") { |f| f.write(value) } rescue => e Base.logger.error "Couldn't create cache directory: #{name} (#{e.message})" if Base.logger end |