As discussed recently, there's been a change to the URL code so that it follows redirects (see http://www.juce.com/forum/topic/how-get-url-follow-redirects?page=1#comment-307967).
The altered code attached below allows arbitrary setting of the number of redirects to be followed. It's implemented and tested for Windows and OS X. It should be OK for iOS, but I'm not set up to test that.
Jules - it'd be great if you could look at including this.
I haven't implemented anything for Android (again I'm not set up for Android development) - however I think this can be achieved by calling HttpURLConnection::setFollowRedirects(false) and looping as per the Windows code. It'd be great if someone could have a go at this (see createHTTPStream in JuceAppActivity.java).
EDIT 1: got myself mucked up between platforms and used the wrong Win32 file, now fixed. The for loop should be as follows:
for (int numRedirects = numRedirectsToFollow; numRedirects >= 0; --numRedirects)
EDIT 2: I'm trying to get set up to try this on Android and have a fair way to go, but found that I introduced a parenthesis error in juce_Android_Network.cpp - this is now fixed. I'll update again as I make more progress.
EDIT 3: It was hard work, but I've now sorted out the Android code. While I was at it I normalised the connection time out, avoided crashes with null statusCode[] or postData[] and added handling for processing of request headers.
EDIT 4: Mac code now confirmed to work OK on iOS also. That just leaves linux now...
EDIT 5: I've had a go at the Linux code and it now seems to handle redirects OK (note that the current JUCE code has a bug where the redirect counter is reset and therefore no limit is enforced).
EDIT 6: OK, so I've created some unit tests for this (see last 6 files). Unsurprisingly this threw up a few more inconsistencies which I've now addressed for all platforms except Linux.
EDIT 7: Linux code has now been re-included (note that HTTPS is not supported).