mirror of
https://github.com/rest-client/rest-client.git
synced 2022-11-09 13:49:40 -05:00
use binary mode for payload's temp file. Fixes #117.
This commit is contained in:
parent
4da24e9c7c
commit
ff99f2ccba
2 changed files with 2 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
||||||
- added Response.to_str and AbstractResponse.to_i to improve semantic and compatibility
|
- 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)
|
- 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)
|
- 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
|
# 1.4.2
|
||||||
|
|
||||||
|
|
|
@ -116,6 +116,7 @@ module RestClient
|
||||||
b = "--#{boundary}"
|
b = "--#{boundary}"
|
||||||
|
|
||||||
@stream = Tempfile.new("RESTClient.Stream.#{rand(1000)}")
|
@stream = Tempfile.new("RESTClient.Stream.#{rand(1000)}")
|
||||||
|
@stream.binmode
|
||||||
@stream.write(b + EOL)
|
@stream.write(b + EOL)
|
||||||
|
|
||||||
if params.is_a? Hash
|
if params.is_a? Hash
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue