File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
modules/elasticsearch/src/main/java/org/elasticsearch/common/http/client Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments