Bug 54374 - ant get does not support 307 redirect
Summary: ant get does not support 307 redirect
Status: RESOLVED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: Core (show other bugs)
Version: 1.8.4
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: 1.9.0
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-04 20:29 UTC by Vance Baarda
Modified: 2013-01-07 17:49 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vance Baarda 2013-01-04 20:29:40 UTC
In http://svn.apache.org/repos/asf/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Get.java is this code:

                if (responseCode == HttpURLConnection.HTTP_MOVED_PERM ||
                        responseCode == HttpURLConnection.HTTP_MOVED_TEMP ||
                        responseCode == HttpURLConnection.HTTP_SEE_OTHER)

Notice that this statement supports HTTP codes 301, 302, and 303, but not the newer code 307. We noticed this problem because Nexus uses 307 to redirect.

References:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.8
https://issues.sonatype.org/browse/NEXUS-5246
Comment 1 Stefan Bodewig 2013-01-05 06:59:17 UTC
fixed with svn revision 1429209
Comment 2 Vance Baarda 2013-01-07 17:49:34 UTC
Thanks!