1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-02 22:14:45 -04:00

HTTP server: prefix log messages with method signature

This commit is contained in:
f4exb
2018-02-11 21:45:44 +01:00
parent b56a4c7a57
commit 132e84b2b6
4 changed files with 37 additions and 37 deletions
+3 -3
View File
@@ -90,7 +90,7 @@ void StaticFileController::service(QByteArray& path, HttpResponse& response)
// Forbid access to files outside the docroot directory
if (path.contains("/.."))
{
qWarning("StaticFileController: detected forbidden characters in path %s",path.data());
qWarning("StaticFileController::service: detected forbidden characters in path %s",path.data());
response.setStatus(403,"forbidden");
response.write("403 forbidden",true);
return;
@@ -137,13 +137,13 @@ void StaticFileController::service(QByteArray& path, HttpResponse& response)
else {
if (file.exists())
{
qWarning("StaticFileController: Cannot open existing file %s for reading",qPrintable(file.fileName()));
qWarning("StaticFileController::service: Cannot open existing file %s for reading",qPrintable(file.fileName()));
response.setStatus(403,"forbidden");
response.write("403 forbidden",true);
}
else
{
qWarning("StaticFileController: File %s not found",qPrintable(file.fileName()));
qWarning("StaticFileController::service: File %s not found",qPrintable(file.fileName()));
response.setStatus(404,"not found");
response.write("404 not found",true);
}