Browse files

Use utility function to check if it's "File"

This could relate to the requested change at
hakanensari/httpclient@4db7912
  • Loading branch information...
1 parent 1221e1a commit 78db8dbb0826bd9e0fb8056b3d1147d7a860945d @nahi committed May 6, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/httpclient/http.rb
View
2 lib/httpclient/http.rb
@@ -532,7 +532,7 @@ def content
private
def set_content(body, boundary = nil)
- if body.respond_to?(:read)
+ if Message.file?(body)
# uses Transfer-Encoding: chunked if body does not respond to :size.
# bear in mind that server may not support it. at least ruby's CGI doesn't.
@body = body

0 comments on commit 78db8db

Please sign in to comment.