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.