1
0
Fork 0
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:
Julien Kirch 2010-04-12 13:22:47 +02:00
parent 4da24e9c7c
commit ff99f2ccba
2 changed files with 2 additions and 0 deletions

View file

@ -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

View file

@ -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