DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Changeset 9113 - Rails Trac - Trac
Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 9113

Show
Ignore:
Timestamp:
03/28/08 19:55:31 (7 months ago)
Author:
david
Message:

Fixed that ActionController::Base#read_multipart would fail if boundary was exactly 10240 bytes (closes #10886) [ariejan]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/CHANGELOG

    r9111 r9113  
    11*SVN* 
     2 
     3* Fixed that ActionController::Base#read_multipart would fail if boundary was exactly 10240 bytes #10886 [ariejan] 
    24 
    35* Fixed HTML::Tokenizer (used in sanitize helper) didn't handle unclosed CDATA tags #10071 [esad, packagethief] 
  • trunk/actionpack/lib/action_controller/request.rb

    r9020 r9113  
    586586              params[name] = [content] 
    587587            end 
    588             break if buf.size == 0 
    589588            break if content_length == -1 
    590589          end 
  • trunk/actionpack/test/controller/request_test.rb

    r9020 r9113  
    602602      "ie_products[file]" => [ ie_file ], 
    603603      "text_part" => [non_file_text_part] 
    604    
     604     
    605605 
    606606    expected_output =  { 
     
    745745  end 
    746746 
     747  def test_boundary_problem_file 
     748    params = process('boundary_problem_file') 
     749    assert_equal %w(file foo), params.keys.sort 
     750 
     751    file = params['file'] 
     752    foo  = params['foo'] 
     753     
     754    if RUBY_VERSION > '1.9' 
     755      assert_kind_of File, file 
     756    else 
     757      assert_kind_of Tempfile, file 
     758    end 
     759     
     760    assert_equal 'file.txt', file.original_filename 
     761    assert_equal "text/plain", file.content_type 
     762     
     763    assert_equal 'bar', foo 
     764  end 
     765   
    747766  def test_large_text_file 
    748767    params = process('large_text_file')