Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

when debugging, don't dump binary data; display message instead

Signed-off-by: Hiroshi Nakamura <nahi@ruby-lang.org>
  • Loading branch information...
commit cfc2abca1cbdc4a5b0af7d822c6d0a7fc8252457 1 parent 2cdbb6b
@chetan chetan authored committed
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/httpclient/session.rb
View
8 lib/httpclient/session.rb
@@ -435,7 +435,13 @@ def <<(str)
private
def debug(str)
- @debug_dev << str if str && @debug_dev
+ if str && @debug_dev
+ if str.include? "\0" then
+ @debug_dev << "#{str.length} bytes of possible binary data\n"
+ else
+ @debug_dev << str
+ end
+ end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.