ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 47433] Issue with "get" task to download a redirected/moved URL (301/302)
Date Sat, 27 Jun 2009 11:53:55 GMT

--- Comment #2 from J.M. (Martijn) Kruithof <>  2009-06-27 04:53:51 PST
I have adapted the patch to avoid redirect loops etc, furthermore I refactored
the code to reach a cleaner solution.

Test show however that redirects are followed by default. This is also the
default setting of the HttpURLConnection.

When researching why the redirect does not work for the hudson download I found
that the HttpURLConnection does not switch protocols. The Sun Java Networking
Engineers reached the conclusion it would be unsafe to switch protocols, this
has been listed in:

Before I progress applying the changes, I would like to pose the question
whether we would want this behavior in ant, even if the Sun Networking
Engineers concluded this would be unsafe. 

For this reason, personally I would tend to say no to the patch with the
protocol change. If Sun deems this change to be safe, this change should be
applied in the HttpURLConnection, I could imagine that a switch from http to
https could be allowed, while a change in the other direction is not. Switches
to yet other protocols pose completely new questions.
If such change is deemed safe, the change should probably be made in the

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message