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

Correct external handling logic. #611

Merged
merged 1 commit into from
Nov 2, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 12 additions & 14 deletions src/XrdHttp/XrdHttpProtocol.cc
Original file line number Diff line number Diff line change
Expand Up @@ -740,22 +740,20 @@ int XrdHttpProtocol::Process(XrdLink *lp) // We ignore the argument here
// Now we have everything that is needed to try the login
// Remember that if there is an exthandler then it has the responsibility
// for authorization in the paths that it manages
if (FindMatchingExtHandler(CurrentReq)) {
if (!Bridge) {
if (SecEntity.name)
Bridge = XrdXrootd::Bridge::Login(&CurrentReq, Link, &SecEntity, SecEntity.name, "XrdHttp");
else
Bridge = XrdXrootd::Bridge::Login(&CurrentReq, Link, &SecEntity, "unknown", "XrdHttp");

if (!Bridge) {
TRACEI(REQ, " Autorization failed.");
return -1;
}
if (!Bridge && !FindMatchingExtHandler(CurrentReq)) {
if (SecEntity.name)
Bridge = XrdXrootd::Bridge::Login(&CurrentReq, Link, &SecEntity, SecEntity.name, "XrdHttp");
else
Bridge = XrdXrootd::Bridge::Login(&CurrentReq, Link, &SecEntity, "unknown", "XrdHttp");

// Let the bridge process the login, and then reinvoke us
DoingLogin = true;
return 0;
if (!Bridge) {
TRACEI(REQ, " Authorization failed.");
return -1;
}

// Let the bridge process the login, and then reinvoke us
DoingLogin = true;
return 0;
}

// Compute and send the response. This may involve further reading from the socket
Expand Down