Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple external handlers to be loaded by XrdHttp. #589

Merged
merged 7 commits into from
Oct 18, 2017
5 changes: 4 additions & 1 deletion src/XrdHttp/XrdHttpProtocol.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ BIO *XrdHttpProtocol::sslbio_err = 0;
XrdCryptoFactory *XrdHttpProtocol::myCryptoFactory = 0;
XrdHttpSecXtractor *XrdHttpProtocol::secxtractor = 0;
std::vector<XrdHttpExtHandler *> XrdHttpProtocol::exthandler;
std::map< std::string, std::string > XrdHttpProtocol::hdr2cgimap;

static const unsigned char *s_server_session_id_context = (const unsigned char *) "XrdHTTPSessionCtx";
static int s_server_session_id_context_len = 18;
Expand Down Expand Up @@ -2443,11 +2444,13 @@ int XrdHttpProtocol::LoadExtHandler(XrdSysError *myeDest, const char *libName,
// Get the entry point of the object creator
//
ep = (XrdHttpExtHandler *(*)(XrdHttpExtHandlerArgs))(myLib.Resolve("XrdHttpGetExtHandler"));

XrdHttpExtHandler *newhandler;
if (ep && (newhandler = ep(myeDest, NULL, libParms))) {
if (ep && (newhandler = ep(myeDest, configFN, libParms, myEnv))) {
exthandler.push_back(newhandler);
return 0;
}

myLib.Unload();
return 1;
}
Expand Down
1 change: 1 addition & 0 deletions src/XrdHttp/XrdHttpReq.cc
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,7 @@ int XrdHttpReq::ProcessHTTPReq() {


// Verify if we have an external handler for this request

XrdHttpExtHandler *exthandler = prot->FindMatchingExtHandler(*this);
if (exthandler) {
XrdHttpExtReq xreq(this, prot);
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.