Browse Source

Specify UTF-8 charset when forming data from plain text

This suppresses a browser warning about unspecified character encoding
of an HTTP response.
adaptive-webui-19844
Chocobo1 4 years ago
parent
commit
2f1016494b
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 2
      src/base/http/types.h
  2. 4
      src/webui/api/torrentscontroller.cpp

2
src/base/http/types.h

@ -63,7 +63,7 @@ namespace Http
const char CONTENT_TYPE_HTML[] = "text/html"; const char CONTENT_TYPE_HTML[] = "text/html";
const char CONTENT_TYPE_CSS[] = "text/css"; const char CONTENT_TYPE_CSS[] = "text/css";
const char CONTENT_TYPE_TXT[] = "text/plain"; const char CONTENT_TYPE_TXT[] = "text/plain; charset=UTF-8";
const char CONTENT_TYPE_JS[] = "application/javascript"; const char CONTENT_TYPE_JS[] = "application/javascript";
const char CONTENT_TYPE_JSON[] = "application/json"; const char CONTENT_TYPE_JSON[] = "application/json";
const char CONTENT_TYPE_GIF[] = "image/gif"; const char CONTENT_TYPE_GIF[] = "image/gif";

4
src/webui/api/torrentscontroller.cpp

@ -601,9 +601,9 @@ void TorrentsController::addAction()
} }
if (partialSuccess) if (partialSuccess)
setResult("Ok."); setResult(QLatin1String("Ok."));
else else
setResult("Fails."); setResult(QLatin1String("Fails."));
} }
void TorrentsController::addTrackersAction() void TorrentsController::addTrackersAction()

Loading…
Cancel
Save