mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 21:33:27 -07:00
Merge pull request #2052 from pmzqla/v3_1_x-charset
WebUI: Set correct HTTP Content-Type in case of forbidden access
This commit is contained in:
commit
f707d6c9d5
1 changed files with 1 additions and 0 deletions
|
@ -193,6 +193,7 @@ void HttpConnection::respond() {
|
|||
if (nb_fail >= MAX_AUTH_FAILED_ATTEMPTS) {
|
||||
m_generator.setStatusLine(403, "Forbidden");
|
||||
m_generator.setMessage(tr("Your IP address has been banned after too many failed authentication attempts."));
|
||||
m_generator.setContentType("text/plain; charset=utf-8");
|
||||
m_generator.setContentEncoding(m_parser.acceptsEncoding());
|
||||
write();
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue