From 7648a2838d4604ffbd013f759e18238b758e5d18 Mon Sep 17 00:00:00 2001 From: Zentino <52699319+zent1n0@users.noreply.github.com> Date: Tue, 27 May 2025 14:47:43 +0800 Subject: [PATCH] Fix access denial messages Updated error messages for access denial from (401) to (403) for remote content. Added (401) status code to authentication error messages. PR #22774. --- src/base/net/downloadhandlerimpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/net/downloadhandlerimpl.cpp b/src/base/net/downloadhandlerimpl.cpp index 370347946..abc796d37 100644 --- a/src/base/net/downloadhandlerimpl.cpp +++ b/src/base/net/downloadhandlerimpl.cpp @@ -279,13 +279,13 @@ QString Net::DownloadHandlerImpl::errorCodeToString(const QNetworkReply::Network case QNetworkReply::ProxyAuthenticationRequiredError: return tr("The proxy requires authentication in order to honor the request but did not accept any credentials offered"); case QNetworkReply::ContentAccessDenied: - return tr("The access to the remote content was denied (401)"); + return tr("The access to the remote content was denied (403)"); case QNetworkReply::ContentOperationNotPermittedError: return tr("The operation requested on the remote content is not permitted"); case QNetworkReply::ContentNotFoundError: return tr("The remote content was not found at the server (404)"); case QNetworkReply::AuthenticationRequiredError: - return tr("The remote server requires authentication to serve the content but the credentials provided were not accepted"); + return tr("The remote server requires authentication to serve the content but the credentials provided were not accepted (401)"); case QNetworkReply::ProtocolUnknownError: return tr("The Network Access API cannot honor the request because the protocol is not known"); case QNetworkReply::ProtocolInvalidOperationError: