Not sure if opening another connection here was intentional; I'm assuming not.

At any rate, this was apparently what was causing some users' downloads to
stall.  Special thanks to Natalie B. for helping me track down the issue.
This commit is contained in:
Andrzej Kapolka
2011-04-12 22:51:27 +00:00
parent 90edcdf571
commit 9ed9d93623
@@ -83,7 +83,7 @@ public class HTTPDownloader extends Downloader
// make sure we got a satisfactory response code
if (conn instanceof HttpURLConnection) {
HttpURLConnection hcon = (HttpURLConnection)rsrc.getRemote().openConnection();
HttpURLConnection hcon = (HttpURLConnection)conn;
if (hcon.getResponseCode() != HttpURLConnection.HTTP_OK) {
throw new IOException("Unable to download resource " + rsrc.getRemote() + ": " +
hcon.getResponseCode());