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
|
||||
- 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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue