Added all 30x redirects

This commit is contained in:
M66B 2019-11-01 10:16:19 +01:00
parent e18150e181
commit 0442563d6b
1 changed files with 4 additions and 1 deletions

View File

@ -365,7 +365,10 @@ class ImageHelper {
int status = urlConnection.getResponseCode();
if (status == HttpURLConnection.HTTP_MOVED_PERM ||
status == HttpURLConnection.HTTP_MOVED_TEMP) {
status == HttpURLConnection.HTTP_MOVED_TEMP ||
status == HttpURLConnection.HTTP_SEE_OTHER ||
status == 307 /* Temporary redirect */ ||
status == 308 /* Permanent redirect */) {
if (++redirects > MAX_REDIRECTS)
throw new IOException("Too many redirects");