Permalink
Browse files

join utf-8 and ascii-8 bit form data

  • Loading branch information...
1 parent 5ca84b5 commit c9737b2cafa78dea2604fcf9d74faccb6057d518 Mustafa Turan committed Jul 9, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/http_request.rb
View
@@ -339,6 +339,9 @@ def build_multipart
multipart << "\r\n#{f[:file_content]}"
}
multipart << "--#{boundary}--"
+ multipart.each_with_index do |val, key|
+ multipart[key] = val.force_encoding('UTF-8')
+ end
multipart = multipart.join("\r\n")
@headers['Content-length'] = "#{multipart.size}"
@options[:parameters] = multipart

0 comments on commit c9737b2

Please sign in to comment.