git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@932445 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -678,7 +678,7 @@ public class Get extends Task { | |||||
| + (responseCode == HttpURLConnection.HTTP_MOVED_PERM ? " permanently" | + (responseCode == HttpURLConnection.HTTP_MOVED_PERM ? " permanently" | ||||
| : "") + " moved to " + newLocation; | : "") + " moved to " + newLocation; | ||||
| log(message, logLevel); | log(message, logLevel); | ||||
| URL newURL = new URL(newLocation); | |||||
| URL newURL = new URL(aSource, newLocation); | |||||
| if (!redirectionAllowed(aSource, newURL)) | if (!redirectionAllowed(aSource, newURL)) | ||||
| { | { | ||||
| return null; | return null; | ||||
| @@ -96,4 +96,17 @@ | |||||
| <au:assertFileExists file="${output}/downloads/index.html"/> | <au:assertFileExists file="${output}/downloads/index.html"/> | ||||
| <au:assertFileExists file="${output}/downloads/faq.html"/> | <au:assertFileExists file="${output}/downloads/faq.html"/> | ||||
| </target> | </target> | ||||
| <target name="XtestRelativeRedirect"> | |||||
| <get src="${location}/local.cgi" dest="${output}/other.tmp"/> | |||||
| <au:assertTrue> | |||||
| <resourcecount count="1"> | |||||
| <restrict> | |||||
| <file file="${output}/other.tmp" /> | |||||
| <contains text="local redirect succeeded"/> | |||||
| </restrict> | |||||
| </resourcecount> | |||||
| </au:assertTrue> | |||||
| <au:assertLogContains text="local.cgi moved to http" /> | |||||
| </target> | |||||
| </project> | </project> | ||||