fixes #684
This commit is contained in:
Mattia Giuffrida 2017-04-11 13:12:36 +01:00
parent a5f027e1ce
commit e29ec08545
3 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
Copyright (c) 2009-2015 Rick Olson, Zack Hobson
Copyright (c) 2009-2017 Rick Olson, Zack Hobson
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View File

@ -325,7 +325,7 @@ of a major release, support for that Ruby version may be dropped.
## Copyright
Copyright (c) 2009-2013 [Rick Olson](mailto:technoweenie@gmail.com), Zack Hobson.
Copyright (c) 2009-2017 [Rick Olson](mailto:technoweenie@gmail.com), Zack Hobson.
See [LICENSE][] for details.
[net_http]: http://ruby-doc.org/stdlib/libdoc/net/http/rdoc/Net/HTTP.html

View File

@ -151,8 +151,9 @@ module Faraday
@options.methods.include?(env[:method]) || @options.retry_if.call(env, exception)
end
def rewind_files(env)
env && env.each do |_, value|
def rewind_files(body)
return unless body.is_a?(Hash)
body.each do |_, value|
if value.is_a? UploadIO
value.rewind
end