Skip to content

Commit

Permalink
Upgrade to Rack 1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Jun 28, 2010
1 parent 6cc29ab commit f3bb185
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion actionpack/actionpack.gemspec
Expand Up @@ -23,7 +23,7 @@ Gem::Specification.new do |s|
s.add_dependency('activemodel', version)
s.add_dependency('builder', '~> 2.1.2')
s.add_dependency('i18n', '~> 0.4.1')
s.add_dependency('rack', '~> 1.1.0')
s.add_dependency('rack', '~> 1.2.1')
s.add_dependency('rack-test', '~> 0.5.4')
#s.add_dependency('rack-mount', '~> 0.6.6')
s.add_dependency('tzinfo', '~> 0.3.16')
Expand Down
22 changes: 14 additions & 8 deletions actionpack/test/dispatch/request/multipart_params_parsing_test.rb
Expand Up @@ -89,15 +89,21 @@ def teardown
assert_equal 19512, file.size
end

# Pending fix in Rack 1.2.2
# http://rack.lighthouseapp.com/projects/22435-rack/tickets/79-multipart-handling-incorrectly-assuming-file-upload
test "parses mixed files" do
params = parse_multipart('mixed_files')
assert_equal %w(files foo), params.keys.sort
assert_equal 'bar', params['foo']

# Rack doesn't handle multipart/mixed for us.
files = params['files']
files.force_encoding('ASCII-8BIT') if files.respond_to?(:force_encoding)
assert_equal 19756, files.size
if Rack.release <= '1.2.1'
$stderr.puts 'multipart/mixed parsing pending fix in Rack 1.2.2'
else
params = parse_multipart('mixed_files')
assert_equal %w(files foo), params.keys.sort
assert_equal 'bar', params['foo']

# Rack doesn't handle multipart/mixed for us.
files = params['files']
files.force_encoding('ASCII-8BIT') if files.respond_to?(:force_encoding)
assert_equal 19756, files.size
end
end

test "does not create tempfile if no file has been selected" do
Expand Down

0 comments on commit f3bb185

Please sign in to comment.