mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 12:59:56 -07:00
WebUI: Add charset attribute to text content types.
This commit is contained in:
parent
7b7f88ae4f
commit
d85c3170b2
3 changed files with 6 additions and 6 deletions
|
@ -50,7 +50,7 @@ HttpResponse AbstractRequestHandler::run()
|
||||||
if (isBanned())
|
if (isBanned())
|
||||||
{
|
{
|
||||||
status(403, "Forbidden");
|
status(403, "Forbidden");
|
||||||
print(QObject::tr("Your IP address has been banned after too many failed authentication attempts."));
|
print(QObject::tr("Your IP address has been banned after too many failed authentication attempts."), CONTENT_TYPE_TXT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,12 +40,12 @@ const QString HEADER_CONTENT_TYPE = "Content-Type";
|
||||||
const QString HEADER_CONTENT_ENCODING = "Content-Encoding";
|
const QString HEADER_CONTENT_ENCODING = "Content-Encoding";
|
||||||
const QString HEADER_CONTENT_LENGTH = "Content-Length";
|
const QString HEADER_CONTENT_LENGTH = "Content-Length";
|
||||||
|
|
||||||
const QString CONTENT_TYPE_CSS = "text/css";
|
const QString CONTENT_TYPE_CSS = "text/css; charset=UTF-8";
|
||||||
const QString CONTENT_TYPE_GIF = "image/gif";
|
const QString CONTENT_TYPE_GIF = "image/gif";
|
||||||
const QString CONTENT_TYPE_HTML = "text/html";
|
const QString CONTENT_TYPE_HTML = "text/html; charset=UTF-8";
|
||||||
const QString CONTENT_TYPE_JS = "text/javascript";
|
const QString CONTENT_TYPE_JS = "text/javascript; charset=UTF-8";
|
||||||
const QString CONTENT_TYPE_PNG = "image/png";
|
const QString CONTENT_TYPE_PNG = "image/png";
|
||||||
const QString CONTENT_TYPE_TXT = "text/plain";
|
const QString CONTENT_TYPE_TXT = "text/plain; charset=UTF-8";
|
||||||
|
|
||||||
struct HttpEnvironment
|
struct HttpEnvironment
|
||||||
{
|
{
|
||||||
|
|
|
@ -268,7 +268,7 @@ void RequestHandler::action_command_upload()
|
||||||
{
|
{
|
||||||
qWarning() << "I/O Error: Could not create temporary file";
|
qWarning() << "I/O Error: Could not create temporary file";
|
||||||
status(500, "Internal Server Error");
|
status(500, "Internal Server Error");
|
||||||
print(QByteArray("I/O Error: Could not create temporary file."), CONTENT_TYPE_TXT);
|
print(QObject::tr("I/O Error: Could not create temporary file."), CONTENT_TYPE_TXT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue