diff --git a/readropslibrary/src/main/java/com/readrops/readropslibrary/Utils/Utils.java b/readropslibrary/src/main/java/com/readrops/readropslibrary/Utils/Utils.java index 3e27f9f3..d50c4eed 100644 --- a/readropslibrary/src/main/java/com/readrops/readropslibrary/Utils/Utils.java +++ b/readropslibrary/src/main/java/com/readrops/readropslibrary/Utils/Utils.java @@ -10,6 +10,7 @@ public final class Utils { public static final String RSS_APPLICATION_CONTENT_TYPE = "application/xml"; public static final String ATOM_CONTENT_TYPE = "application/atom+xml"; public static final String JSON_CONTENT_TYPE = "application/json"; + public static final String HTML_CONTENT_TYPE = "text/html"; public static String inputStreamToString(InputStream input) { Scanner scanner = new Scanner(input).useDelimiter("\\A"); diff --git a/readropslibrary/src/main/java/com/readrops/readropslibrary/localfeed/RSSNetwork.java b/readropslibrary/src/main/java/com/readrops/readropslibrary/localfeed/RSSNetwork.java index e7603ef9..dfc7ba85 100644 --- a/readropslibrary/src/main/java/com/readrops/readropslibrary/localfeed/RSSNetwork.java +++ b/readropslibrary/src/main/java/com/readrops/readropslibrary/localfeed/RSSNetwork.java @@ -54,7 +54,7 @@ public class RSSNetwork { if (response.isSuccessful()) { RSSType type = getRSSType(header); if (type == null) { - callback.onSyncFailure(new IllegalArgumentException("bad content type")); + callback.onSyncFailure(new IllegalArgumentException("bad content type : " + header + "for " + url)); return; } @@ -123,6 +123,8 @@ public class RSSNetwork { return RSSType.RSS_ATOM; case Utils.JSON_CONTENT_TYPE: return RSSType.RSS_JSON; + case Utils.HTML_CONTENT_TYPE: + return RSSType.RSS_UNKNOWN; default: Log.d(TAG, "bad content type : " + contentType); return null;