• Adrian Petrescu's avatar
    Deal gracefully with invalid Accept-Languages header · 5341910e
    Adrian Petrescu authored
    At the moment, calibre-web will raise an internal 500 error if an
    invalid locale identifier is passed in through the `Accept-Language`
    HTTP header (for a non-logged-in user).
    
    This breaks some crappily-built OPDS feed readers, and there's no reason
    to error out so severely. This commit just gracefully falls back to `en`
    if it can't parse the locale identifier.
    
    Fixes #743 among others.
    5341910e
web.py 175 KB