From 96fe89286c3ae8fd9f7161b9946680723b3be0a0 Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Wed, 13 Mar 2013 09:32:30 +0100 Subject: [PATCH] do not retry on http status 406 --- enabler/src/de/schildbach/pte/util/ParserUtils.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/enabler/src/de/schildbach/pte/util/ParserUtils.java b/enabler/src/de/schildbach/pte/util/ParserUtils.java index ea35d233..b5b07c6b 100644 --- a/enabler/src/de/schildbach/pte/util/ParserUtils.java +++ b/enabler/src/de/schildbach/pte/util/ParserUtils.java @@ -192,7 +192,8 @@ public final class ParserUtils throw new IOException(message + ": " + url); } } - 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) { throw new BlockedException(url); } @@ -342,7 +343,8 @@ public final class ParserUtils return is; } } - 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) { throw new BlockedException(url); }