mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 09:13:08 -07: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) {
|
catch (const HTTPError &error) {
|
||||||
status(error.statusCode(), error.statusText());
|
status(error.statusCode(), error.statusText());
|
||||||
if (!error.message().isEmpty())
|
print((!error.message().isEmpty() ? error.message() : error.statusText()), Http::CONTENT_TYPE_TXT);
|
||||||
print(error.message(), Http::CONTENT_TYPE_TXT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const Http::Header &prebuiltHeader : asConst(m_prebuiltHeaders))
|
for (const Http::Header &prebuiltHeader : asConst(m_prebuiltHeaders))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue