def reachable_for_download? (pw = '', check_http = true)
      pw ||= ''
      http_checked = ""
      if check_http && http_downloads_enabled
        if @username_password_required
          # we don't check the pw here, because if the connection fails, we'll
          # drop down below to try the password for mounting.
          # we'll escape all the chars that aren't unreserved
          #reserved_chars = Regexp.new("[^#{URI::REGEXP::PATTERN::UNRESERVED}]")
          user_pass = "#{CGI.escape @http_username}:#{CGI.escape ro_pw}@"
          url = @http_url.sub "://#{@ip_address}", "://#{user_pass}#{@ip_address}"
        else
          url = @http_url
        end

        begin
          open(url).read
          return :http
        rescue
          http_checked = "http and "
        end
      end # if  check_http && http_downloads_enabled

      return :mountable if mounted?

      return false unless check_pw :ro , pw

      begin
        mount pw, :ro
        return :mountable
      rescue
        return false
      ensure
        unmount
      end
    end
def reachable_for_download? (pw = '', check_http = true)
      pw ||= ''
      http_checked = ""
      if check_http && http_downloads_enabled
        if @username_password_required
          # we don't check the pw here, because if the connection fails, we'll
          # drop down below to try the password for mounting.
          # we'll escape all the chars that aren't unreserved
          #reserved_chars = Regexp.new("[^#{URI::REGEXP::PATTERN::UNRESERVED}]")
          user_pass = "#{CGI.escape @http_username}:#{CGI.escape ro_pw}@"
          url = @http_url.sub "://#{@ip_address}", "://#{user_pass}#{@ip_address}"
        else
          url = @http_url
        end

        begin
          open(url).read
          return :http
        rescue
          http_checked = "http and "
        end
      end # if  check_http && http_downloads_enabled

      return :mountable if mounted?

      return false unless check_pw :ro , pw

      begin
        mount pw, :ro
        return :mountable
      rescue
        return false
      ensure
        unmount
      end
    end
Check to see if this dist point is reachable for downloads (read-only)
 via either http, if available, or filesharing.

 @param pw[String] the read-only password to use for checking the connection
   If http downloads are enabled, and no http password is required
   this can be omitted.

 @param check_http[Boolean] should we try the http download first, if enabled?
   If you're intentionally using the ro password for filesharing, and want to check
   only filesharing, then set this to false.

 @return [FalseClass, Symbol] false if not reachable, otherwise :http or :mountable