github redirects from https to http
This commit is contained in:
parent
d3c0e250ec
commit
c25d9a7842
|
@ -226,14 +226,15 @@ public class HttpDownloadHelper {
|
||||||
|
|
||||||
|
|
||||||
private boolean redirectionAllowed(URL aSource, URL aDest) throws IOException {
|
private boolean redirectionAllowed(URL aSource, URL aDest) throws IOException {
|
||||||
if (!(aSource.getProtocol().equals(aDest.getProtocol()) || ("http"
|
// Argh, github does this...
|
||||||
.equals(aSource.getProtocol()) && "https".equals(aDest
|
// if (!(aSource.getProtocol().equals(aDest.getProtocol()) || ("http"
|
||||||
.getProtocol())))) {
|
// .equals(aSource.getProtocol()) && "https".equals(aDest
|
||||||
String message = "Redirection detected from "
|
// .getProtocol())))) {
|
||||||
+ aSource.getProtocol() + " to " + aDest.getProtocol()
|
// String message = "Redirection detected from "
|
||||||
+ ". Protocol switch unsafe, not allowed.";
|
// + aSource.getProtocol() + " to " + aDest.getProtocol()
|
||||||
throw new IOException(message);
|
// + ". Protocol switch unsafe, not allowed.";
|
||||||
}
|
// throw new IOException(message);
|
||||||
|
// }
|
||||||
|
|
||||||
redirections++;
|
redirections++;
|
||||||
if (redirections > 5) {
|
if (redirections > 5) {
|
||||||
|
|
Loading…
Reference in New Issue