Changeset 6233
- Timestamp:
- 02/25/07 20:16:58 (2 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/streaming.rb (modified) (1 diff)
- trunk/actionpack/test/controller/send_file_test.rb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r6232 r6233 1 1 *SVN* 2 3 * Allow send_file/send_data to use a registered mime type as the :type parameter #7620 [jonathan] 2 4 3 5 * Allow routing requirements on map.resource(s) #7633 [quixoten]. Example: trunk/actionpack/lib/action_controller/streaming.rb
r6142 r6233 125 125 headers.update( 126 126 'Content-Length' => options[:length], 127 'Content-Type' => options[:type]. strip, # fixes a problem with extra '\r' with some browsers127 'Content-Type' => options[:type].to_s.strip, # fixes a problem with extra '\r' with some browsers 128 128 'Content-Disposition' => disposition, 129 129 'Content-Transfer-Encoding' => 'binary' trunk/actionpack/test/controller/send_file_test.rb
r6169 r6233 27 27 include TestFileUtils 28 28 29 Mime::Type.register "image/png", :png unless defined? Mime::PNG 30 29 31 def setup 30 32 @controller = SendFileController.new … … 84 86 options = { 85 87 :length => 1, 86 :type => 'type',88 :type => Mime::PNG, 87 89 :disposition => 'disposition', 88 90 :filename => 'filename' … … 99 101 h = @controller.headers 100 102 assert_equal 1, h['Content-Length'] 101 assert_equal ' type', h['Content-Type']103 assert_equal 'image/png', h['Content-Type'] 102 104 assert_equal 'disposition; filename="filename"', h['Content-Disposition'] 103 105 assert_equal 'binary', h['Content-Transfer-Encoding']