MCPcopy Create free account
hub / github.com/awawa-dev/HyperHDR / printErrorToReply

Method printErrorToReply

sources/webserver/FileServer.cpp:118–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118void FileServer::printErrorToReply(QtHttpReply* reply, QtHttpReply::StatusCode code, QString errorMessage)
119{
120 reply->setStatusCode(code);
121 reply->addHeader("Content-Type", QByteArrayLiteral("text/html"));
122 reply->appendRawData(QString(QString::number(code) + " - " + errorMessage).toLocal8Bit());
123}
124
125QString FileServer::getMimeName(QString filename)
126{

Callers

nothing calls this directly

Calls 3

setStatusCodeMethod · 0.80
addHeaderMethod · 0.45
appendRawDataMethod · 0.45

Tested by

no test coverage detected