63a710f When a file a detected as a binary file, return the raw file

Authored and Committed by pingou 3 years ago
    When a file a detected as a binary file, return the raw file
    
    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>
    
        
file modified
+7 -1