aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/network
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2013-09-15 18:47:17 +0200
committerSamuel Tardieu <sam@rfc1149.net>2013-09-15 18:51:33 +0200
commit40d66b9b9a14cd65f36ccd13ae962058a9d9d4ca (patch)
treefe864c74a0e721f71b78c0889ff328e7ba11c5b0 /main/src/cgeo/geocaching/network
parent4cc85b839b7f4f15a92ec1070059bbda13c03e98 (diff)
downloadcgeo-40d66b9b9a14cd65f36ccd13ae962058a9d9d4ca.zip
cgeo-40d66b9b9a14cd65f36ccd13ae962058a9d9d4ca.tar.gz
cgeo-40d66b9b9a14cd65f36ccd13ae962058a9d9d4ca.tar.bz2
Do not retry loading a page after 404 from gc.com
When a page cannot be found, geocaching.com returns with a 404. Retrying while logged in would not change anything, and we should not consider ourselves as logged as guest because of this error.
Diffstat (limited to 'main/src/cgeo/geocaching/network')
-rw-r--r--main/src/cgeo/geocaching/network/Network.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/network/Network.java b/main/src/cgeo/geocaching/network/Network.java
index 873cfc9..1810216 100644
--- a/main/src/cgeo/geocaching/network/Network.java
+++ b/main/src/cgeo/geocaching/network/Network.java
@@ -399,6 +399,10 @@ public abstract class Network {
return response != null && response.getStatusLine().getStatusCode() == 200;
}
+ static public boolean isPageNotFound(@Nullable final HttpResponse response) {
+ return response != null && response.getStatusLine().getStatusCode() == 404;
+ }
+
/**
* Get the result of a GET HTTP request returning a JSON body.
*