mirror of https://gitee.com/bigwinds/arangodb
fixed merge
This commit is contained in:
parent
4605fbba9a
commit
97ff940736
|
@ -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<string>::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);
|
||||
|
||||
|
|
|
@ -31,8 +31,6 @@
|
|||
#include "ApplicationServer/ApplicationFeature.h"
|
||||
#include "Admin/RestVersionHandler.h"
|
||||
|
||||
#include "Rest/AddressPort.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- forward declarations
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
///
|
||||
|
|
|
@ -150,10 +150,6 @@ void ApplicationHttpsServer::setupOptions (map<string, ProgramOptionsDescription
|
|||
("server.ssl-options", &_sslOptions, "ssl options, see OpenSSL documentation")
|
||||
("server.ssl-cipher-list", &_sslCipherList, "ssl cipher list, see OpenSSL documentation")
|
||||
;
|
||||
|
||||
options[ApplicationServer::OPTIONS_SERVER + ":help-extended"]
|
||||
("server.https-auth", &_httpsAuth, "use basic authentication")
|
||||
;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -248,9 +244,11 @@ HttpsServer* ApplicationHttpsServer::buildHttpsServer (const EndpointList* endpo
|
|||
dispatcher = _applicationDispatcher->dispatcher();
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (_httpsAuth) {
|
||||
auth = _checkAuthentication;
|
||||
}
|
||||
#endif
|
||||
|
||||
// check the ssl context
|
||||
if (_sslContext == 0) {
|
||||
|
|
|
@ -30,8 +30,7 @@
|
|||
|
||||
#include "ApplicationServer/ApplicationFeature.h"
|
||||
|
||||
#include <UserManager/Right.h>
|
||||
#include "Rest/AddressPort.h"
|
||||
#include "UserManager/Right.h"
|
||||
|
||||
namespace triagens {
|
||||
namespace rest {
|
||||
|
|
Loading…
Reference in New Issue