Loading src/authdb.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -248,6 +248,14 @@ namespace authdb { } if(_AdminBackend.end()<=sizeof(authdb::AuthHeader)){ // API requests should get JSON error, not the wizard HTML if(curreq.getRequestURL().compare(0,4,"/api",4)==0){ libhttppp::HttpResponse rep; rep.setState(HTTP503); rep.setContentType("application/json"); rep.send(curreq,"[{\"error\":\"not initialized\"}]",29); return; } std::cerr << "[AUTHDB] wizard check: end=" << _AdminBackend.end() << " header=" << sizeof(authdb::AuthHeader) << std::endl; AuthBackend::Guard admlock(_AdminBackend); Loading Loading
src/authdb.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -248,6 +248,14 @@ namespace authdb { } if(_AdminBackend.end()<=sizeof(authdb::AuthHeader)){ // API requests should get JSON error, not the wizard HTML if(curreq.getRequestURL().compare(0,4,"/api",4)==0){ libhttppp::HttpResponse rep; rep.setState(HTTP503); rep.setContentType("application/json"); rep.send(curreq,"[{\"error\":\"not initialized\"}]",29); return; } std::cerr << "[AUTHDB] wizard check: end=" << _AdminBackend.end() << " header=" << sizeof(authdb::AuthHeader) << std::endl; AuthBackend::Guard admlock(_AdminBackend); Loading