diff --git a/history.md b/history.md index f85cb08..4b4350f 100644 --- a/history.md +++ b/history.md @@ -3,6 +3,7 @@ - added Response.to_str and AbstractResponse.to_i to improve semantic and compatibility - multipart Payloads ignores the name attribute if it's not set (patch provided by Tekin Suleyman) - correctly takes into account user headers whose keys are strings (path provided by Cyril Rohr) +- use binary mode for payload temp file # 1.4.2 diff --git a/lib/restclient/payload.rb b/lib/restclient/payload.rb index 197d20b..d97fa92 100644 --- a/lib/restclient/payload.rb +++ b/lib/restclient/payload.rb @@ -116,6 +116,7 @@ module RestClient b = "--#{boundary}" @stream = Tempfile.new("RESTClient.Stream.#{rand(1000)}") + @stream.binmode @stream.write(b + EOL) if params.is_a? Hash