Closed Bug 949998 Opened 11 years ago Closed 9 years ago

Can't inline output PDFs if using POST

Categories

(Firefox :: PDF Viewer, defect, P2)

26 Branch
x86_64
Windows 7
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: eithed, Unassigned)

References

Details

(Keywords: regression, Whiteboard: [pdfjs-c-integration])

Attachments

(1 file)

Attached file generate.php
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36

Steps to reproduce:

I'm trying to output PDF to the browser - if using GET method everything works fine, but for POST requests the pdf.js outputs nothing. When downloading the PDF, it will contain the standard, GET HTML, indicating that type of request isn't passed to (or used by) pdf.js

Please find attached PHP file to replicate the issue. Works with any PDF file (named bug.pdf, inside the same directory as the script).


Actual results:

PDF fails to load. When downloading PDF contains HTML, instead of binary data.


Expected results:

PDF should load.
Component: Untriaged → PDF Viewer
The script is wrongfully claims it can handle by saying "header('Accept-Ranges: bytes');", but actually it cannot. 

We don't check for GET method at http://mxr.mozilla.org/mozilla-central/source/browser/extensions/pdfjs/content/PdfStreamConverter.jsm#856 . Looks like it's a regression from adding chunk requests.
Priority: -- → P2
Whiteboard: [pdfjs-c-integration]
I can't reproduce this, even with a build from back when this was filed. I uploaded the attached testcase and a bug.pdf of my creation, but when I click the "Submit Query" button, the pdf loads as expected in a clean profile.

Pawel, if you're still seeing this, feel free to needinfo? me and we can reopen the bug. Thanks!
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
This should be fixed by bug 1084158, and more specifically the upstream PR https://github.com/mozilla/pdf.js/pull/5263.
Depends on: 1084158
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: