Bugfixes and Rails Edge
Update to Rails 2.3.1. (Actually, not quite. Doesn't look like 2.3.1 will be released today, but I REALLY want to push these bugfixes out.) Removed bundled Rack (Rails 2.3.1 comes bundled with Rack 1.0). Add config.action_view.cache_template_loading = true to production environment. Fix FastCGI bug (http://rubyforge.org/tracker/index.php?func=detail&aid=24191&group_id=186&atid=783). Fix WikiWords bug (http://rubyforge.org/pipermail/instiki-users/2009-February/001181.html).
This commit is contained in:
parent
0ddef97328
commit
133c21b801
641 changed files with 20541 additions and 71675 deletions
|
@ -1,5 +1,6 @@
|
|||
module ActionController #:nodoc:
|
||||
# Methods for sending files and streams to the browser instead of rendering.
|
||||
# Methods for sending arbitrary data and for streaming files to the browser,
|
||||
# instead of rendering.
|
||||
module Streaming
|
||||
DEFAULT_SEND_FILE_OPTIONS = {
|
||||
:type => 'application/octet-stream'.freeze,
|
||||
|
@ -103,8 +104,11 @@ module ActionController #:nodoc:
|
|||
end
|
||||
end
|
||||
|
||||
# Send binary data to the user as a file download. May set content type, apparent file name,
|
||||
# and specify whether to show data inline or download as an attachment.
|
||||
# Sends the given binary data to the browser. This method is similar to
|
||||
# <tt>render :text => data</tt>, but also allows you to specify whether
|
||||
# the browser should display the response as a file attachment (i.e. in a
|
||||
# download dialog) or as inline data. You may also set the content type,
|
||||
# the apparent file name, and other things.
|
||||
#
|
||||
# Options:
|
||||
# * <tt>:filename</tt> - suggests a filename for the browser to use.
|
||||
|
@ -127,6 +131,10 @@ module ActionController #:nodoc:
|
|||
# send_data image.data, :type => image.content_type, :disposition => 'inline'
|
||||
#
|
||||
# See +send_file+ for more information on HTTP Content-* headers and caching.
|
||||
#
|
||||
# <b>Tip:</b> if you want to stream large amounts of on-the-fly generated
|
||||
# data to the browser, then use <tt>render :text => proc { ... }</tt>
|
||||
# instead. See ActionController::Base#render for more information.
|
||||
def send_data(data, options = {}) #:doc:
|
||||
logger.info "Sending data #{options[:filename]}" if logger
|
||||
send_file_headers! options.merge(:length => data.size)
|
||||
|
@ -152,7 +160,7 @@ module ActionController #:nodoc:
|
|||
end
|
||||
content_type = content_type.to_s.strip # fixes a problem with extra '\r' with some browsers
|
||||
|
||||
headers.update(
|
||||
headers.merge!(
|
||||
'Content-Length' => options[:length],
|
||||
'Content-Type' => content_type,
|
||||
'Content-Disposition' => disposition,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue