diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-06-28 17:42:51 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-06-28 17:42:51 +0000 |
commit | 62ed6950c9119c12e6b17a68c79c45c77a7b1ca4 (patch) | |
tree | c00beda4e2f4ea5e88f39882dc421cb8b7e68a0d /actionpack/lib/action_controller/base.rb | |
parent | 96e590ca3c25e63d03c9ae5d74a40538cbe88f58 (diff) | |
download | rails-62ed6950c9119c12e6b17a68c79c45c77a7b1ca4.tar.gz rails-62ed6950c9119c12e6b17a68c79c45c77a7b1ca4.tar.bz2 rails-62ed6950c9119c12e6b17a68c79c45c77a7b1ca4.zip |
Added support for upload progress indicators in Apache and lighttpd 1.4.x (won't work in WEBrick or lighttpd 1.3.x) #1475 [Sean Treadway]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1552 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/base.rb')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index bd0e78719d..2e0d554a55 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -508,12 +508,24 @@ module ActionController #:nodoc: return result end - # Clears the rendered results, allowing for another render or redirect to be performed. + # Clears the rendered results, allowing for another render to be performed. def erase_render_results #:nodoc: @response.body = nil @performed_render = false end + # Clears the redirected results from the headers, resetting the status to 200 and returns + # the URL that was used to redirect or nil if there was no redirected URL + # Note that +redirect_to+ will change the body of the response to indicate a redirection. + # The response body is not reset here, see +erase_render_results+ + def erase_redirect_results #:nodoc: + @performed_redirect = false + response.redirected_to = nil + response.redirected_to_method_params = nil + response.headers['Status'] = DEFAULT_RENDER_STATUS_CODE + response.headers.delete('location') + end + def rewrite_options(options) if defaults = default_url_options(options) defaults.merge(options) |