Skip to content

Commit

Permalink
[Server] Fixes #344 - squash path before checking for static redirect.
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 committed May 13, 2016
1 parent 7c9a4aa commit 4454ad6
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/XrdXrootd/XrdXrootdXeq.cc
Expand Up @@ -1224,16 +1224,15 @@ int XrdXrootdProtocol::do_Open()
//
doDig = (digFS && SFS_LCLPATH(fn));

// Check if static redirection applies
//
if (!doDig && Route[RD_open1].Host[rdType] && (popt = RPList.Validate(fn)))
return Response.Send(kXR_redirect, Route[popt].Port[rdType],
Route[popt].Host[rdType]);

// Validate the path
// Validate the path and then check if static redirection applies
//
if (doDig) {popt = XROOTDXP_NOLK; opC = 0;}
else if (!(popt = Squash(fn))) return vpEmsg("Opening", fn);
else {int ropt;
if (!(popt = Squash(fn))) return vpEmsg("Opening", fn);
if (Route[RD_open1].Host[rdType] && (ropt = RPList.Validate(fn)))
return Response.Send(kXR_redirect, Route[ropt].Port[rdType],
Route[ropt].Host[rdType]);
}

// Add the multi-write option if this path supports it
//
Expand Down

0 comments on commit 4454ad6

Please sign in to comment.