module HTTPClient::DebugSocket

def debug(str)

def debug(str)
  if str && @debug_dev
    if str.index("\0")
      require 'hexdump'
      str.force_encoding('BINARY') if str.respond_to?(:force_encoding)
      @debug_dev << HexDump.encode(str).join("\n")
    else
      @debug_dev << str
    end
  end
end