Closed Bug 949998 Opened 10 years ago Closed 8 years ago

Can't inline output PDFs if using POST


(Firefox :: PDF Viewer, defect, P2)

26 Branch
Windows 7





(Reporter: eithed, Unassigned)



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


(1 file)

485 bytes, text/plain
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 . 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!
Closed: 8 years ago
Resolution: --- → WORKSFORME
This should be fixed by bug 1084158, and more specifically the upstream PR
Depends on: 1084158
You need to log in before you can comment on or make changes to this bug.