indiabhi / pagure

Forked from pagure 7 years ago
Clone

6dba781 Let the doc server return something even if we do not know its encoding

Authored and Committed by pingou 7 years ago
    Let the doc server return something even if we do not know its encoding
    
    Sometime when trying to retrieve the encoding of some content, we just
    fail at guessing it.
    So far this led pagure to return a 500 error without any content.
    With this commit, we know catch the exception, consider the content as
    not safe but we will return it. This means that we will at least return
    something to the user.
    
    This fixes an error reported by pagure by email where it could not render
    https://docs.pagure.org/packaging-guidelines/
    
        
file modified
+6 -1