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

RESOLVED FIXED in Firefox 9

Status

()

Firefox
File Handling
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: rjohnson19, Assigned: Kailas)

Tracking

8 Branch
Firefox 9
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
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.

Updated

6 years ago
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
(Reporter)

Updated

6 years ago
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
(Assignee)

Comment 2

6 years ago
Created attachment 557398 [details] [diff] [review]
Patch on a changeset:75619:482742e6fff7

Patch
(Assignee)

Updated

6 years ago
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
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.