15 lines
372 B
C++
15 lines
372 B
C++
#include "MediocreSimpleStaticFileHandler.H"
|
|
|
|
std::string MediocreSimpleStaticFileHandler::cleanpath (const char * const path){
|
|
//adds no security at all
|
|
return std::string(path);
|
|
}
|
|
|
|
int MediocreSimpleStaticFileHandler::answer_pathreq(const char * const path,
|
|
struct mg_connection *conn)
|
|
{
|
|
mg_send_file(conn,cleanpath(path).c_str());
|
|
return 0;
|
|
}
|
|
|