aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-07-12 19:31:48 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-07-12 19:31:48 +0000
commitcb0f8fda9652c4d24d04693bdb82cecd3b067e5c (patch)
tree467c099ce607c4569a14fa0a07826236d4939a47 /actionpack
parent847f738cfd8acf5db065cd9bb1ca3d47a7676fa3 (diff)
downloadrails-cb0f8fda9652c4d24d04693bdb82cecd3b067e5c.tar.gz
rails-cb0f8fda9652c4d24d04693bdb82cecd3b067e5c.tar.bz2
rails-cb0f8fda9652c4d24d04693bdb82cecd3b067e5c.zip
Worked around a Safari bug where it wouldn't pass headers through if the response was zero length by having render :nothing return ' ' instead of ''
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1818 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rwxr-xr-xactionpack/lib/action_controller/base.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index 44341f1bfb..5d6e8d9777 100755
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -559,7 +559,7 @@ module ActionController #:nodoc:
# === Rendering nothing
#
# Rendering nothing is often convenient in combination with Ajax calls that perform their effect client-side or
- # when you just want to communicate a status code.
+ # when you just want to communicate a status code. Due to a bug in Safari, nothing actually means a single space.
#
# # Renders an empty response with status code 200
# render :nothing => true
@@ -621,7 +621,8 @@ module ActionController #:nodoc:
) }))
elsif options[:nothing]
- render(options.merge({ :text => "" }))
+ # Safari doesn't pass the headers of the return if the response is zero length
+ render(options.merge({ :text => " " }))
else
render(options.merge({ :action => action_name }))