From cb073daca365e78bbd65045584a8217f91115e21 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 19 Oct 2024 06:36:03 +0200 Subject: [PATCH] Changed response code to opds download forbidden to 401 instead of 404 --- cps/opds.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/cps/opds.py b/cps/opds.py index 3d8c78b9..485d241a 100644 --- a/cps/opds.py +++ b/cps/opds.py @@ -424,11 +424,8 @@ def feed_shelf(book_id): @requires_basic_auth_if_no_ano def opds_download_link(book_id, book_format): if not auth.current_user().role_download(): - return abort(403) - if "Kobo" in request.headers.get('User-Agent'): - client = "kobo" - else: - client = "" + return abort(401) + client = "kobo" if "Kobo" in request.headers.get('User-Agent') else "" return get_download_link(book_id, book_format.lower(), client)