This commit is contained in:
Luis Ángel San Martín
2015-03-21 14:40:25 +01:00
parent 8315e8ec34
commit 743d896649
15 changed files with 33 additions and 30 deletions

View File

@ -19,7 +19,7 @@ void ComicController::service(HttpRequest& request, HttpResponse& response)
{
HttpSession session=Static::sessionStore->getSession(request,response,false);
QString path = QUrl::fromPercentEncoding(request.getPath()).toLatin1();
QString path = QUrl::fromPercentEncoding(request.getPath()).toUtf8();
QStringList pathElements = path.split('/');
qulonglong libraryId = pathElements.at(2).toLongLong();
QString libraryName = DBHelper::getLibraryName(libraryId);
@ -76,7 +76,7 @@ void ComicController::service(HttpRequest& request, HttpResponse& response)
session.setCurrentComic(comic.id, comicFile);
}
response.setHeader("Content-Type", "plain/text; charset=ISO-8859-1");
response.setHeader("Content-Type", "plain/text; charset=utf-8");
//TODO this field is not used by the client!
response.writeText(QString("library:%1\r\n").arg(libraryName));
response.writeText(QString("libraryId:%1\r\n").arg(libraryId));