You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I'm using deep_locate on a Hash that includes a file, it is manipulated.
I figured out this problem, when checking if a file is included in a hash, before sending it via POST to a REST service. The file isn't sent anymore, when calling deep_locate before.
If you comment the line with deep_locate, everything is fine.
defhash_include_file?(hash)lambda_condition=lambda{ |key,value,object| value.is_a?File}Hashie::Extensions::DeepLocate.deep_locate(lambda_condition,hash) != []endfile=File.new('example_file.txt','rb')params={file: file}RestClient.post"www.example.com",params,{content_type: 'multipart/form-data'}hash_include_file?params# this line makes the difference!RestClient.post"www.example.com",params,{content_type: 'multipart/form-data'}
The requests differ in this way (see the Content-Length):
Since after almost a year still no reaction has taken place, I have cleaned up the example project. The above example should be sufficient if the bug is fixed at some point.
When I'm using deep_locate on a Hash that includes a file, it is manipulated.
I figured out this problem, when checking if a file is included in a hash, before sending it via POST to a REST service. The file isn't sent anymore, when calling deep_locate before.
If you comment the line with deep_locate, everything is fine.
The requests differ in this way (see the Content-Length):
I created a example project, including a rspec file, to show the problem.
https://github.com/entwanderer/rest-client-hashie
The text was updated successfully, but these errors were encountered: