Closed Bug 947559 Opened 8 years ago Closed 7 years ago

NASA PDFs stall upon download, had to use wget

Categories

(Firefox :: PDF Viewer, defect, P2)

27 Branch
x86
Linux
defect

Tracking

()

RESOLVED FIXED
Firefox 36

People

(Reporter: jidanni, Unassigned)

References

Details

(Whiteboard: [pdfjs-c-network][pdfjs-f-good-beginner-bug][pdfjs-f-fixed-upstream] https://github.com/mozilla/pdf.js/pull/5263)

User Agent: Mozilla/5.0 (X11; Linux i686; rv:27.0) Gecko/20100101 Firefox/27.0 Iceweasel/27.0a2 (Beta/Release)
Build ID: 20131115004004

Steps to reproduce:

# set http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19810021384_1981021384.pdf
# su - nobody -c 'HOME=/tmp firefox '"$@" #virgin Firefox






Actual results:

We see it stalls just a tiny bit into the download there in PDFJS. Same with the rest of the PDFs on that site.


Expected results:

Should have got the whole file like wget.
Component: Untriaged → PDF Viewer
Priority: -- → P2
Whiteboard: [pdfjs-c-network]
HTTP request and response look like:

==========

GET /archive/nasa/casi.ntrs.nasa.gov/19810021384_1981021384.pdf HTTP/1.1
Host: ntrs.nasa.gov
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.7,ru;q=0.3
Accept-Encoding: gzip, deflate
DNT: 1
Cookie: JSESSIONID=84EED8B5C72385633274DFF37EADD064; JSESSIONID=84EED8B5C72385633274DFF37EADD064
Connection: keep-alive
Cache-Control: max-age=0
Range: bytes=0-65535

------

HTTP/1.1 206 Partial Content
Date: Tue, 17 Dec 2013 13:15:57 GMT
Server: Apache/2.2.15 (Red Hat) mod_jk/1.2.37 mod_ssl/2.2.15 OpenSSL/1.0.0-fips
Last-Modified: Sat, 31 Aug 2013 17:12:07 GMT
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: multipart/byteranges; boundary=multipart-boundary

1ff8

--multipart-boundary
Content-Type: application/pdf
Content-Range: bytes 0-65535/5668864

==========

Per RFC 2616: "When an HTTP message includes the content of a single range (for example, a response to a request for a single range, or to a request for a set of ranges that overlap without any holes), this content is transmitted with a Content-Range header, and a Content-Length header showing the number of bytes actually transferred... A response to a request for a single range MUST NOT be sent using the multipart/byteranges media type."

That makes response from NASA server invalid. It might be possible to implement a workaround/hack on the PDF.js that will discard invalid response (e.g. by checking the headers similar to bug 918291) and start fetching the whole file.
Whiteboard: [pdfjs-c-network] → [pdfjs-c-network][pdfjs-f-good-beginner-bug]
Mozilla/5.0 (X11; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0

On latest Aurora (20140106004002) the pdf is not loaded, setting this issue as NEW.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Status: NEW → RESOLVED
Closed: 7 years ago
Depends on: 1084158
Resolution: --- → FIXED
Whiteboard: [pdfjs-c-network][pdfjs-f-good-beginner-bug] → [pdfjs-c-network][pdfjs-f-good-beginner-bug][pdfjs-f-fixed-upstream] https://github.com/mozilla/pdf.js/pull/5263
Target Milestone: --- → Firefox 36
You need to log in before you can comment on or make changes to this bug.