Closed Bug 931665 Opened 11 years ago Closed 11 years ago

pdf.js does not handle 403 forbidden responses

Categories

(Firefox :: Untriaged, defect)

24 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: list, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0 (Beta/Release) Build ID: 20130911164256 Steps to reproduce: I tried to open a pdf document and the server's HTTP response was "403: Forbidden". (The link I used was http://www.shangri-la.com/uploadedFiles/Shangri-la_Hotels/Sydney,_Shangri-La/dining/restaurants/Altitude_Restaurant/Altitude-Restaurant-Wine-List.pdf which is currently forbidden due to a misconfiguration of the webserver) Actual results: pdf.js showed the "This PDF document might not be displayed correctly - Open With Different Viewer" message. (Clicking the button opened another PDF viewer which then said the fila was ccorrupted) Expected results: pdf.js should have shown the "403: Forbidden" message so it is clear that it is not an issue with the document itself but the server. Ideally pdf.js would not be shown at all but instead Firefox would show the normal 403 page.
The response status was 200 for me. How did you inspect the response status?
I used wget. I just tried again with wget and spoofed a Firefox user agent string. Then I got a 200 status and the server returned an empty document. So not the fault of pdf.js but a broken server. Sorry about the bug report.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.