Commit 3b3a9934 authored by jan.koester's avatar jan.koester
Browse files

test

parent e513ddb3
Loading
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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);