Cope with the current situation where PA's servers somehow strip the
content-length header even though the servlet container is providing one. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3029 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: JNLPDownloader.java,v 1.16 2004/02/25 14:49:39 mdb Exp $
|
// $Id: JNLPDownloader.java,v 1.17 2004/06/16 09:25:52 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.resource;
|
package com.threerings.resource;
|
||||||
|
|
||||||
@@ -95,10 +95,13 @@ public class JNLPDownloader extends Downloader
|
|||||||
throw new IOException(errmsg);
|
throw new IOException(errmsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if we're versioning, we know we need an update
|
// if we're versioning, we know we need an update; force the
|
||||||
info.totalSize += ucon.getContentLength();
|
// content length to be at least 1 so that we behave marginally
|
||||||
Log.info(getResourceURL() + " requires " + ucon.getContentLength() +
|
// sensibly (ticking off each file as we download it) if our
|
||||||
" byte update.");
|
// server doesn't provide content-length for some assinine reason
|
||||||
|
int cl = Math.max(ucon.getContentLength(), 1);
|
||||||
|
info.totalSize += cl;
|
||||||
|
Log.info(getResourceURL() + " requires " + cl + " byte update.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user