mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 03:04:33 +02:00
fix for ttf return in DS, closes #1769
This commit is contained in:
parent
7a3ce7c89d
commit
4b18e37dfb
1 changed files with 5 additions and 2 deletions
|
@ -63,7 +63,7 @@ bool HTTPManager::handleHTTPRequest(HTTPConnection* connection, const QString& p
|
|||
|
||||
QFile localFile(filePath);
|
||||
localFile.open(QIODevice::ReadOnly);
|
||||
QString localFileString(localFile.readAll());
|
||||
QByteArray localFileData = localFile.readAll();
|
||||
|
||||
QFileInfo localFileInfo(filePath);
|
||||
|
||||
|
@ -77,6 +77,7 @@ bool HTTPManager::handleHTTPRequest(HTTPConnection* connection, const QString& p
|
|||
|
||||
int matchPosition = 0;
|
||||
|
||||
QString localFileString(localFileData);
|
||||
|
||||
while ((matchPosition = includeRegExp.indexIn(localFileString, matchPosition)) != -1) {
|
||||
// check if this is a file or vitual include
|
||||
|
@ -105,9 +106,11 @@ bool HTTPManager::handleHTTPRequest(HTTPConnection* connection, const QString& p
|
|||
// push the match position forward so we can check the next match
|
||||
matchPosition += includeRegExp.matchedLength();
|
||||
}
|
||||
|
||||
localFileData = localFileString.toLocal8Bit();
|
||||
}
|
||||
|
||||
connection->respond(HTTPConnection::StatusCode200, localFileString.toLocal8Bit(),
|
||||
connection->respond(HTTPConnection::StatusCode200, localFileData,
|
||||
qPrintable(mimeDatabase.mimeTypeForFile(filePath).name()));
|
||||
} else {
|
||||
|
||||
|
|
Loading…
Reference in a new issue