Skip to content

Commit c25d9a7

Browse files
committed
github redirects from https to http
1 parent d3c0e25 commit c25d9a7

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

modules/elasticsearch/src/main/java/org/elasticsearch/common/http/client/HttpDownloadHelper.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -226,14 +226,15 @@ private boolean get() throws IOException {
226226

227227

228228
private boolean redirectionAllowed(URL aSource, URL aDest) throws IOException {
229-
if (!(aSource.getProtocol().equals(aDest.getProtocol()) || ("http"
230-
.equals(aSource.getProtocol()) && "https".equals(aDest
231-
.getProtocol())))) {
232-
String message = "Redirection detected from "
233-
+ aSource.getProtocol() + " to " + aDest.getProtocol()
234-
+ ". Protocol switch unsafe, not allowed.";
235-
throw new IOException(message);
236-
}
229+
// Argh, github does this...
230+
// if (!(aSource.getProtocol().equals(aDest.getProtocol()) || ("http"
231+
// .equals(aSource.getProtocol()) && "https".equals(aDest
232+
// .getProtocol())))) {
233+
// String message = "Redirection detected from "
234+
// + aSource.getProtocol() + " to " + aDest.getProtocol()
235+
// + ". Protocol switch unsafe, not allowed.";
236+
// throw new IOException(message);
237+
// }
237238

238239
redirections++;
239240
if (redirections > 5) {

0 commit comments

Comments
 (0)