Handle HTTP status '401 UNAUTHORIZED'.

This commit is contained in:
Andreas Schildbach 2014-07-01 21:53:42 +02:00
parent 27894dbf78
commit 5e47d29312

View file

@ -183,8 +183,9 @@ public final class ParserUtils
return is;
}
else if (responseCode == HttpURLConnection.HTTP_FORBIDDEN || responseCode == HttpURLConnection.HTTP_BAD_REQUEST
|| responseCode == HttpURLConnection.HTTP_NOT_ACCEPTABLE || responseCode == HttpURLConnection.HTTP_UNAVAILABLE)
else if (responseCode == HttpURLConnection.HTTP_BAD_REQUEST || responseCode == HttpURLConnection.HTTP_UNAUTHORIZED
|| responseCode == HttpURLConnection.HTTP_FORBIDDEN || responseCode == HttpURLConnection.HTTP_NOT_ACCEPTABLE
|| responseCode == HttpURLConnection.HTTP_UNAVAILABLE)
{
throw new BlockedException(url);
}