aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-07-15 15:31:31 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-07-15 15:31:31 -0700
commit8e105a55383a3c94dfe3507c37b79a5e4fe85276 (patch)
tree3d968f5e083dbd9c7baf4c275ac8d67793ca8693 /actionpack
parent3ef98a1439aa3009f3c641652e2f19e3522543fb (diff)
downloadrails-8e105a55383a3c94dfe3507c37b79a5e4fe85276.tar.gz
rails-8e105a55383a3c94dfe3507c37b79a5e4fe85276.tar.bz2
rails-8e105a55383a3c94dfe3507c37b79a5e4fe85276.zip
rack 1.6 encodes the filenames in posts correctly now
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/http/upload.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/actionpack/lib/action_dispatch/http/upload.rb b/actionpack/lib/action_dispatch/http/upload.rb
index 45bf751d09..538bcfdcd7 100644
--- a/actionpack/lib/action_dispatch/http/upload.rb
+++ b/actionpack/lib/action_dispatch/http/upload.rb
@@ -27,7 +27,7 @@ module ActionDispatch
@tempfile = hash[:tempfile]
raise(ArgumentError, ':tempfile is required') unless @tempfile
- @original_filename = encode_filename(hash[:filename])
+ @original_filename = hash[:filename]
@content_type = hash[:type]
@headers = hash[:head]
end
@@ -66,13 +66,6 @@ module ActionDispatch
def eof?
@tempfile.eof?
end
-
- private
-
- def encode_filename(filename)
- # Encode the filename in the utf8 encoding, unless it is nil
- filename.force_encoding(Encoding::UTF_8).encode! if filename
- end
end
end
end