diff --git a/arangod/RestServer/ArangoServer.cpp b/arangod/RestServer/ArangoServer.cpp index fc2a91fe77..ac43f14327 100755 --- a/arangod/RestServer/ArangoServer.cpp +++ b/arangod/RestServer/ArangoServer.cpp @@ -389,7 +389,11 @@ void ArangoServer::buildApplicationServer () { // an https server // ............................................................................. - _applicationHttpsServer = new ApplicationHttpsServer(_applicationScheduler, _applicationDispatcher); + _applicationHttpsServer = new ApplicationHttpsServer(_applicationServer, + _applicationScheduler, + _applicationDispatcher, + "arangodb", + TRI_CheckAuthenticationAuthInfo); _applicationServer->addFeature(_applicationHttpsServer); #endif @@ -427,8 +431,6 @@ void ArangoServer::buildApplicationServer () { // for this server we display our own options such as port to use // ............................................................................. - _applicationHttpServer->showPortOptions(false); - additional["ENDPOINT Options"] ("server.endpoint", &_endpoints, "endpoint for client HTTP requests") ; @@ -595,14 +597,10 @@ int ArangoServer::startupServer () { _applicationDispatcher->buildStandardQueue(_dispatcherThreads); - Dispatcher* dispatcher = _applicationDispatcher->dispatcher(); - // ............................................................................. // create a client http server and http handler factory // ............................................................................. - Scheduler* scheduler = _applicationScheduler->scheduler(); - // add & validate endpoints for (vector::const_iterator i = _endpoints.begin(); i != _endpoints.end(); ++i) { Endpoint* endpoint = Endpoint::serverFactory(*i); @@ -640,7 +638,7 @@ int ArangoServer::startupServer () { // HTTP endpoints if (_endpointList.count(Endpoint::PROTOCOL_HTTP) > 0) { // create the http server - _httpServer = _applicationHttpServer->buildServer(new HttpServer(scheduler, dispatcher), &_endpointList); + _httpServer = _applicationHttpServer->buildServer(&_endpointList); DefineApiHandlers(_httpServer, _applicationAdminServer, _vocbase); diff --git a/lib/Admin/ApplicationAdminServer.h b/lib/Admin/ApplicationAdminServer.h index e67f5edb61..221ebeba8f 100644 --- a/lib/Admin/ApplicationAdminServer.h +++ b/lib/Admin/ApplicationAdminServer.h @@ -31,8 +31,6 @@ #include "ApplicationServer/ApplicationFeature.h" #include "Admin/RestVersionHandler.h" -#include "Rest/AddressPort.h" - // ----------------------------------------------------------------------------- // --SECTION-- forward declarations // ----------------------------------------------------------------------------- diff --git a/lib/HttpServer/ApplicationHttpServer.cpp b/lib/HttpServer/ApplicationHttpServer.cpp index b0dcbaef76..29684de69f 100644 --- a/lib/HttpServer/ApplicationHttpServer.cpp +++ b/lib/HttpServer/ApplicationHttpServer.cpp @@ -62,7 +62,6 @@ ApplicationHttpServer::ApplicationHttpServer (ApplicationServer* applicationServ _applicationDispatcher(applicationDispatcher), _authenticationRealm(authenticationRealm), _checkAuthentication(checkAuthentication), - _httpAuth(false), _httpServers() { } @@ -92,6 +91,14 @@ ApplicationHttpServer::~ApplicationHttpServer () { /// @brief builds the http server //////////////////////////////////////////////////////////////////////////////// +HttpServer* ApplicationHttpServer::buildServer (const EndpointList* endpointList) { + return buildHttpServer(0, endpointList); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief builds the http server +//////////////////////////////////////////////////////////////////////////////// + HttpServer* ApplicationHttpServer::buildServer (HttpServer* httpServer, const EndpointList* endpointList) { return buildHttpServer(httpServer, endpointList); @@ -208,9 +215,11 @@ HttpServer* ApplicationHttpServer::buildHttpServer (HttpServer* httpServer, dispatcher = _applicationDispatcher->dispatcher(); } +#if 0 if (_httpAuth) { auth = _checkAuthentication; } +#endif httpServer = new HttpServer(scheduler, dispatcher, _authenticationRealm, auth); } diff --git a/lib/HttpServer/ApplicationHttpServer.h b/lib/HttpServer/ApplicationHttpServer.h index 6fbf442ea6..9d23a8c9ec 100644 --- a/lib/HttpServer/ApplicationHttpServer.h +++ b/lib/HttpServer/ApplicationHttpServer.h @@ -31,6 +31,7 @@ #include "ApplicationServer/ApplicationFeature.h" #include "HttpServer/HttpHandlerFactory.h" +#include "Rest/EndpointList.h" // ----------------------------------------------------------------------------- // --SECTION-- forward declarations @@ -106,6 +107,12 @@ namespace triagens { public: +//////////////////////////////////////////////////////////////////////////////// +/// @brief builds the http server +//////////////////////////////////////////////////////////////////////////////// + + HttpServer* buildServer (const EndpointList*); + //////////////////////////////////////////////////////////////////////////////// /// @brief builds the http server /// diff --git a/lib/HttpsServer/ApplicationHttpsServer.cpp b/lib/HttpsServer/ApplicationHttpsServer.cpp index c61407a895..d9ce056220 100644 --- a/lib/HttpsServer/ApplicationHttpsServer.cpp +++ b/lib/HttpsServer/ApplicationHttpsServer.cpp @@ -150,10 +150,6 @@ void ApplicationHttpsServer::setupOptions (mapdispatcher(); } +#if 0 if (_httpsAuth) { auth = _checkAuthentication; } +#endif // check the ssl context if (_sslContext == 0) { diff --git a/lib/UserManager/ApplicationUserManager.h b/lib/UserManager/ApplicationUserManager.h index cd204fe154..29761fa5fc 100644 --- a/lib/UserManager/ApplicationUserManager.h +++ b/lib/UserManager/ApplicationUserManager.h @@ -30,8 +30,7 @@ #include "ApplicationServer/ApplicationFeature.h" -#include -#include "Rest/AddressPort.h" +#include "UserManager/Right.h" namespace triagens { namespace rest {