ImageOnMap

ImageOnMap

148k Downloads

Redirect instead of rejecting for 3xx HTTP codes

AmauryCarrade opened this issue ยท 2 comments

commented

We should follow redirections.

if ((httpCode / 100) != 2)
{
throw new IOException(I.t("HTTP error: {0} {1}", httpCode, httpConnection.getResponseMessage()));
}

commented

We can follow the redirection location in the header

commented

We'll have to implement redirection manually. Even if there is a followRedirects flag in URLConnection, it will not redirect if the protocol changes (e.g. http to https).