#4964 When a file a detected as a binary file, return the raw file
Merged by pingou. Opened by pingou.
fix_view_binary  into  master

Download 4964.patch

Basically, with the code until now, if an user was trying to view
a binary file in the UI, it was then prompted to download the file
(as pagure doesn't know how to display binary file), but the file
the users were downloading wasn't the raw file but rather the html
page that would contain the file.
Not ideal.

So with this commit we're now just saying: if the file is binary and
we can't render it, just return the raw file to the user and let
them deal with it.

Fixes https://pagure.io/pagure/issue/4907

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

:thumbsup:

rebased onto 12ccb912bc9dca39c4ce325ff80f8c24688cb382

rebased onto 48add203db509f12b903546743f0b01e2c8d3e82

rebased onto 811f5a39c1eb28635cfd9e0b6f063f28a4c2c3fb

rebased onto 8f6c4a91b22c3088d965070bfbec9a808685ce9e

rebased onto 102cb9311ac31fdf7440937d49f04fb9bfd1a8a0

pretty please pagure-ci rebuild

rebased onto 63a710fcfb68db68d6bc722afe6286446fda186e

:thumbsup:

:thumbsup:

Thanks! :)

Pull-Request has been merged by pingou

Metadata