URL ending with “.pdf” causes Brave to ignore Content-Type, then fail because document is not PDF



When a response does not declare the content to be a PDF document, a browser should not attempt to render the response as a PDF.

But this is what Brave tries to do, when the URL ends with “.pdf”. Even with a response whose Content-Type is “text/html”.

Of course, with a “Content-Type: text/html” document, the PDF viewer will fail.

Brave should be ignoring the URL and instead use the Content-Type to decide what the content type is.

PDF file "Corrupted" when opening in browser

Hi @benf_wspdigital,

Thanks for reporting! Is this on desktop (Win, Mac or Linux) or mobile (Android or iOS)?
Can you please give any example sites we could use to reproduce? It would be helpful. :wink:
Also, can you please post your Brave version?

Thank you,


I noticed the failure with a private URL (sharing a PDF document) so no, I don’t have an example that would be useful without access to the private sharing service.

This is desktop Brave, version 0.18.14, on macOS.


Thank you for the info. :slight_smile:
I open an issue for this. And you can track it here:

Thank you,

closed #5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.