mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-23 01:36:15 +03:00
Always specify Content-Type in Web API error responses
This commit is contained in:
parent
841536c9c5
commit
6e4f49fc57
1 changed files with 1 additions and 2 deletions
|
@ -466,8 +466,7 @@ Http::Response WebApplication::processRequest(const Http::Request &request, cons
|
|||
}
|
||||
catch (const HTTPError &error) {
|
||||
status(error.statusCode(), error.statusText());
|
||||
if (!error.message().isEmpty())
|
||||
print(error.message(), Http::CONTENT_TYPE_TXT);
|
||||
print((!error.message().isEmpty() ? error.message() : error.statusText()), Http::CONTENT_TYPE_TXT);
|
||||
}
|
||||
|
||||
for (const Http::Header &prebuiltHeader : asConst(m_prebuiltHeaders))
|
||||
|
|
Loading…
Reference in a new issue