Bug 683258 - Size reported as -1 bytes when attempting download with no Content-Length header; r=dolske

This commit is contained in:
Kailas 2011-09-06 15:32:52 -04:00
parent 09ac4cf16e
commit 54756f03b3

View File

@ -611,7 +611,8 @@ nsUnknownContentTypeDialog.prototype = {
else
typeString = mimeInfo.MIMEType;
}
if (this.mLauncher.contentLength) {
// When the length is unknown, contentLength would be -1
if (this.mLauncher.contentLength >= 0) {
let [size, unit] = DownloadUtils.
convertByteUnits(this.mLauncher.contentLength);
type.value = this.dialogElement("strings")