public
Description: Merb More: The Full Stack. Take what you need; leave what you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-more.git
Cache error with default content-type fixed. Closing #125
booss (author)
Mon May 05 02:37:39 -0700 2008
commit  4f87aceb53318e5f9122577b6e646f6c139d1532
tree    60bf5b2e7724935edb7dced8374068816d733a42
parent  8690d673201d6cff9019dc26291af773eafdb4a0
...
121
122
123
124
 
 
125
126
127
...
121
122
123
 
124
125
126
127
128
0
@@ -121,7 +121,8 @@ module Merb::Cache::ControllerInstanceMethods
0
     return unless pages && pages.key?(action)
0
     path = request.path.chomp("/")
0
     path = "index" if path.empty?
0
-    ext = "." + (params[:format].empty? ? DEFAULT_PAGE_EXTENSION : params[:format])
0
+    no_format = params[:format].nil? || params[:format].empty?
0
+    ext = "." + (no_format ? DEFAULT_PAGE_EXTENSION : params[:format])
0
     ext = nil if File.extname(path) == ext
0
     cache_file = Merb::Controller._cache.config[:cache_html_directory] / "#{path}#{ext}"
0
     if data

Comments