Update QtWebApp to v1.8.6

This commit is contained in:
Felix Kauselmann
2022-10-08 13:38:52 +02:00
parent 083888efde
commit 2e72e428ba
14 changed files with 157 additions and 39 deletions

View File

@ -53,7 +53,7 @@ void StaticFileController::service(HttpRequest &request, HttpResponse &response)
qDebug("StaticFileController: Cache hit for %s",path.data());
setContentType(filename,response);
response.setHeader("Cache-Control","max-age="+QByteArray::number(maxAge/1000));
response.write(document);
response.write(document,true);
}
else
{
@ -80,6 +80,7 @@ void StaticFileController::service(HttpRequest &request, HttpResponse &response)
{
setContentType(path,response);
response.setHeader("Cache-Control","max-age="+QByteArray::number(maxAge/1000));
response.setHeader("Content-Length",QByteArray::number(file.size()));
if (file.size()<=maxCachedFileSize)
{
// Return the file content and store it also in the cache