From 5e47d293124a778a405e0a228a489f0ae9cf39ed Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Tue, 1 Jul 2014 21:53:42 +0200 Subject: [PATCH] Handle HTTP status '401 UNAUTHORIZED'. --- enabler/src/de/schildbach/pte/util/ParserUtils.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/enabler/src/de/schildbach/pte/util/ParserUtils.java b/enabler/src/de/schildbach/pte/util/ParserUtils.java index c58d62fb..6faeba93 100644 --- a/enabler/src/de/schildbach/pte/util/ParserUtils.java +++ b/enabler/src/de/schildbach/pte/util/ParserUtils.java @@ -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); }