Handle HTTP status 'not available'

This commit is contained in:
Andreas Schildbach 2013-11-21 17:39:53 +01:00
parent 61dc053701
commit 6c7b7137a8

View file

@ -194,7 +194,7 @@ public final class ParserUtils
} }
} }
else if (responseCode == HttpURLConnection.HTTP_FORBIDDEN || responseCode == HttpURLConnection.HTTP_BAD_REQUEST else if (responseCode == HttpURLConnection.HTTP_FORBIDDEN || responseCode == HttpURLConnection.HTTP_BAD_REQUEST
|| responseCode == HttpURLConnection.HTTP_NOT_ACCEPTABLE) || responseCode == HttpURLConnection.HTTP_NOT_ACCEPTABLE || responseCode == HttpURLConnection.HTTP_UNAVAILABLE)
{ {
throw new BlockedException(url); throw new BlockedException(url);
} }
@ -353,7 +353,7 @@ public final class ParserUtils
} }
} }
else if (responseCode == HttpURLConnection.HTTP_FORBIDDEN || responseCode == HttpURLConnection.HTTP_BAD_REQUEST else if (responseCode == HttpURLConnection.HTTP_FORBIDDEN || responseCode == HttpURLConnection.HTTP_BAD_REQUEST
|| responseCode == HttpURLConnection.HTTP_NOT_ACCEPTABLE) || responseCode == HttpURLConnection.HTTP_NOT_ACCEPTABLE || responseCode == HttpURLConnection.HTTP_UNAVAILABLE)
{ {
throw new BlockedException(url); throw new BlockedException(url);
} }