Loading src/admin.cpp +2 −9 Changes for src/admin.cpp: 2 added lines, 9 removed lines. Original line number Diff line number Diff line Loading @@ -2486,14 +2486,7 @@ namespace authdb { } if(!sdat){ libhttppp::HttpResponse rep; cookie.setcookie(&rep,"authdbid",nullptr,nullptr,nullptr,-1,"/"); rep.setState(HTTP307); rep.setVersion(HTTPVERSION(1.1)); rep.setHeaderData("Location")->push_back(curreq->getRequestURL()); rep.setContentType("text/html"); rep.send(curreq,nullptr,0); return; throw AuthBackendError("No Session found!"); } }catch(...){ try { Loading Loading @@ -2637,7 +2630,7 @@ URLNOTFOUND: } void AdminInterface::Request(libhttppp::HttpRequest *curreq, const int tid, ULONG_PTR args){ if(curreq->getRequestURL().compare(0,10,"/settings")==0){ if(curreq->getRequestURL().compare(0,9,"/settings")==0){ _ctl->SettingsController(curreq,tid,args); }else{ libhttppp::HttpResponse rep; Loading src/authdb.cpp +4 −3 Changes for src/authdb.cpp: 4 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -162,13 +162,14 @@ namespace authdb { } void RequestEvent(libhttppp::HttpRequest * curreq, const int tid, ULONG_PTR args){ if(curreq->getRequestURL().compare(0,9,"/authdb.js")==0){ std::cout << curreq->getRequestURL().compare(0,10,"/style.css") << std::endl; if(curreq->getRequestURL().compare(0,10,"/authdb.js")==0){ libhttppp::HttpResponse rep; rep.setState(HTTP200); rep.setContentType("text/javascript"); rep.send(curreq,_AuthJs.data(),_AuthJs.size()); return; }else if(curreq->getRequestURL().compare(0,9,"/style.css")==0){ }else if(curreq->getRequestURL().compare(0,10,"/style.css")==0){ libhttppp::HttpResponse rep; rep.setState(HTTP200); rep.setContentType("text/css"); Loading @@ -193,7 +194,7 @@ namespace authdb { } if(curreq->getRequestURL().compare(0,10,"/settings")==0){ if(curreq->getRequestURL().compare(0,9,"/settings")==0){ _AdminBackend.lock(); try{ _AdminInterface.Request(curreq,tid,args); Loading Loading
src/admin.cpp +2 −9 Changes for src/admin.cpp: 2 added lines, 9 removed lines. Original line number Diff line number Diff line Loading @@ -2486,14 +2486,7 @@ namespace authdb { } if(!sdat){ libhttppp::HttpResponse rep; cookie.setcookie(&rep,"authdbid",nullptr,nullptr,nullptr,-1,"/"); rep.setState(HTTP307); rep.setVersion(HTTPVERSION(1.1)); rep.setHeaderData("Location")->push_back(curreq->getRequestURL()); rep.setContentType("text/html"); rep.send(curreq,nullptr,0); return; throw AuthBackendError("No Session found!"); } }catch(...){ try { Loading Loading @@ -2637,7 +2630,7 @@ URLNOTFOUND: } void AdminInterface::Request(libhttppp::HttpRequest *curreq, const int tid, ULONG_PTR args){ if(curreq->getRequestURL().compare(0,10,"/settings")==0){ if(curreq->getRequestURL().compare(0,9,"/settings")==0){ _ctl->SettingsController(curreq,tid,args); }else{ libhttppp::HttpResponse rep; Loading
src/authdb.cpp +4 −3 Changes for src/authdb.cpp: 4 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -162,13 +162,14 @@ namespace authdb { } void RequestEvent(libhttppp::HttpRequest * curreq, const int tid, ULONG_PTR args){ if(curreq->getRequestURL().compare(0,9,"/authdb.js")==0){ std::cout << curreq->getRequestURL().compare(0,10,"/style.css") << std::endl; if(curreq->getRequestURL().compare(0,10,"/authdb.js")==0){ libhttppp::HttpResponse rep; rep.setState(HTTP200); rep.setContentType("text/javascript"); rep.send(curreq,_AuthJs.data(),_AuthJs.size()); return; }else if(curreq->getRequestURL().compare(0,9,"/style.css")==0){ }else if(curreq->getRequestURL().compare(0,10,"/style.css")==0){ libhttppp::HttpResponse rep; rep.setState(HTTP200); rep.setContentType("text/css"); Loading @@ -193,7 +194,7 @@ namespace authdb { } if(curreq->getRequestURL().compare(0,10,"/settings")==0){ if(curreq->getRequestURL().compare(0,9,"/settings")==0){ _AdminBackend.lock(); try{ _AdminInterface.Request(curreq,tid,args); Loading