如果提供了错误的登录凭据,如何避免在Android中挂起httpsURLConnection.getInputStream()?
如果在此处设置了身份验证凭据,如果提供的用户/密码正确,则一切正常,但如果它们不正确则会挂起.这不是服务器问题,我使用Curl和浏览器检查,不正确的凭据立即返回401: Authenticator.setDefault(new Authenticator() {
protected PasswordAuthentication getPasswordAuthentication()