1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-02-02 09:55:55 +00:00

WebUI: Add charset attribute to text content types.

This commit is contained in:
Vladimir Golovnev (Glassez) 2014-11-05 20:11:10 +03:00
parent 7b7f88ae4f
commit d85c3170b2
3 changed files with 6 additions and 6 deletions

View File

@ -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
{ {

View File

@ -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
{ {

View File

@ -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);
} }
} }
} }