This week's book giveaway is in the Testing forum. We're giving away four copies of The Way of the Web Tester: A Beginner's Guide to Automating Tests and have Jonathan Rasmusson on-line! See this thread for details.
Hi. I decided to gain some experience by creating a simple download manager. I noticed that some download links on the internet are not direct links like "http://xxx.com/abcdef.iso" but some links like to have "http://xxx.com/sjjf?bjr=jfbf" some funny query string and redirect users to their downloads.So how do I handle the redirected downloads link ?
posted 7 years ago
Your HTTP handling code would need to detect a Redirect response, and respond to that by issuing a new request for the new URL. I think the Apache Commons HttpClient library can be set to follow redirects automatically.