aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/request_controller.rb
diff options
context:
space:
mode:
authorRobin Houston <robin@lenny.robin>2011-06-21 03:04:16 +0100
committerRobin Houston <robin@lenny.robin>2011-06-21 03:04:16 +0100
commit9e6a39814fc2db20a5b0938a0b623561393ca8f2 (patch)
treebe5f932acc2165170e4c4174ea63884decbd2469 /app/controllers/request_controller.rb
parent49866895325c7e236effe668cec579f2f009220c (diff)
Correct an operator precendence bug in request_controller, and add a test for it.
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r--app/controllers/request_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 9c0855b8d..578e247d1 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -587,7 +587,7 @@ class RequestController < ApplicationController
if foi_fragment_cache_exists?(key_path)
cached = foi_fragment_cache_read(key_path)
- response.content_type = AlaveteliFileTypes.filename_to_mimetype(params[:file_name].join("/")) or 'application/octet-stream'
+ response.content_type = AlaveteliFileTypes.filename_to_mimetype(params[:file_name].join("/")) || 'application/octet-stream'
render_for_text(cached)
return
end
@@ -609,7 +609,7 @@ class RequestController < ApplicationController
@incoming_message.binary_mask_stuff!(@attachment.body, @attachment.content_type)
# we don't use @attachment.content_type here, as we want same mime type when cached in cache_attachments above
- response.content_type = AlaveteliFileTypes.filename_to_mimetype(params[:file_name].join("/")) or 'application/octet-stream'
+ response.content_type = AlaveteliFileTypes.filename_to_mimetype(params[:file_name].join("/")) || 'application/octet-stream'
render :text => @attachment.body
end