PDF files in repository fails with "broken encoding"
Hi,
I have a repository with PDF files in it, and some fails to download/view with gitlab. When that fails, It only shows a:
--broken encoding: UTF-16BE
It also fails with that error when trying to download the file directly with this url: http://gitlab/raoul/playground/raw/master/fail.pdf. The git clone of the repository is working correctly.
From my understanding, gitlab tries to render all PDF files that contains only raw text (pdf that contains only uncompressed vector graphics, for ex). So for some pdf, it fails. When using the "Raw" url it even send the wrong content-type header, ("text/plain; charset=utf-8" instead of pdf).
I think gitlab should not try to render pdf files at all, or maybe better detect pdf files and display them with something like pdf.js.
I attached a failing pdf. I'm using the latest Gitlab CE release 7.14.1
Thanks failing_encoding.pdf