diff --git a/lib/http/form_data/multipart.rb b/lib/http/form_data/multipart.rb index a31deb9..a667643 100644 --- a/lib/http/form_data/multipart.rb +++ b/lib/http/form_data/multipart.rb @@ -52,7 +52,7 @@ def glue # @return [String] def tail - @tail ||= "--#{@boundary}--" + @tail ||= "--#{@boundary}--#{CRLF}" end end end diff --git a/spec/lib/http/form_data/multipart_spec.rb b/spec/lib/http/form_data/multipart_spec.rb index d6432c0..9a71a23 100644 --- a/spec/lib/http/form_data/multipart_spec.rb +++ b/spec/lib/http/form_data/multipart_spec.rb @@ -26,7 +26,7 @@ def disposition(params) "#{disposition 'name' => 'baz', 'filename' => file.filename}#{crlf}", "Content-Type: #{file.content_type}#{crlf}", "#{crlf}#{file}#{crlf}", - "--#{boundary_value}--" + "--#{boundary_value}--#{crlf}" ].join("") end @@ -44,7 +44,7 @@ def disposition(params) "#{disposition 'name' => 'baz', 'filename' => file.filename}#{crlf}", "Content-Type: #{file.content_type}#{crlf}", "#{crlf}#{file}#{crlf}", - "--my-boundary--" + "--my-boundary--#{crlf}" ].join("") end end @@ -61,7 +61,7 @@ def disposition(params) "#{disposition 'name' => 'foo'}#{crlf}", "Content-Type: #{part.content_type}#{crlf}", "#{crlf}s#{crlf}", - "--#{boundary_value}--" + "--#{boundary_value}--#{crlf}" ].join("") end end @@ -77,7 +77,7 @@ def disposition(params) "--#{boundary_value}#{crlf}", "#{disposition 'name' => 'foo'}#{crlf}", "#{crlf}s#{crlf}", - "--#{boundary_value}--" + "--#{boundary_value}--#{crlf}" ].join("") end end