Luis Ángel San Martín f4e55729a2 fixed comiplation in Linux (Ubuntu)
line 117: #define _WIN64 1
must be removed in ./compressed_archive/libp7zip/CPP/myWindows/StdAfx.h

"cannot find -lpulse" compiling under Qt 5.0.2 can be fixed creating a symbolic link from libpulse.so.0 to libpulse.so (further research is needed)
2013-12-08 11:50:10 -08:00

26 lines
572 B
C++

#include "errorcontroller.h"
#include "template.h"
#include "../static.h"
ErrorController::ErrorController(int errorCode)
:error(errorCode)
{}
void ErrorController::service(HttpRequest& request, HttpResponse& response)
{
Q_UNUSED(request)
switch(error)
{
case 300:
response.setStatus(300,"redirect");
response.write("<html> <head> <meta http-equiv=\"refresh\" content=\"0; URL=/\"> </head> <body> </body> </html>", true);
break;
case 404:
response.setStatus(404,"not found");
response.write("404 not found",true);
break;
}
}