Closed Bug 683258 Opened 9 years ago Closed 9 years ago

Size reported as -1 bytes when attempting download with no Content-Length header

Categories

(Firefox :: File Handling, defect)

8 Branch
x86_64
Windows 7
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 9

People

(Reporter: rjohnson19, Assigned: patilkr24)

References

()

Details

Attachments

(1 file)

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0a2) Gecko/20110830 Firefox/8.0a2

With any PDF plugins disabled, attempt to download the PDF http://www.alfresco.com/services/subscription/supported-platforms/3-x.pdf, or browse to http://www.alfresco.com/services/subscription/supported-platforms/ and click the link Supported Platforms for Alfresco Enterprise 3.x.

The download dialog displays:
PDF Document (-1 bytes)

The other PDFs on http://www.alfresco.com/services/subscription/supported-platforms/ work fine.

I noticed that the server does not appear to be sending a Content-Length header for the problematic file.
Component: File Handling → General
Product: Firefox → Core
QA Contact: file.handling → general
Why is this a core bug?  Core is correctly reporting a content-length of -1 (which means unknown).  Sounds to me like the UI is what's broken.
Component: General → File Handling
Product: Core → Firefox
QA Contact: general → file.handling
Blocks: 595888
Summary: Size reported as -1 bytes when attempting to download a PDF → Size reported as -1 bytes when attempting download with no Content-Length header
Patch
Attachment #557398 - Flags: review?(dolske)
Comment on attachment 557398 [details] [diff] [review]
Patch on a changeset:75619:482742e6fff7

Probably worth a tiny comment here to note that .contentLength == -1 when the length is unknown.
Attachment #557398 - Flags: review?(dolske) → review+
I landed this with the suggested comment fix.  Thanks a lot for your patch, Kailas!  :-)

http://hg.mozilla.org/integration/mozilla-inbound/rev/5ab4ecc3ff2c
Assignee: nobody → patilkr24
Target Milestone: --- → Firefox 9
http://hg.mozilla.org/mozilla-central/rev/5ab4ecc3ff2c
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.