Skip to content

Commit

Permalink
Merge pull request #1571 from ellert/older-regex
Browse files Browse the repository at this point in the history
Help older compiler find the right template.
  • Loading branch information
abh3 committed Dec 15, 2021
2 parents 646a861 + e7cf71c commit 48b1bf4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/XrdMacaroons/XrdMacaroonsHandler.cc
@@ -1,5 +1,4 @@

#include <regex>
#include <cstring>
#include <string>
#include <iostream>
Expand Down
7 changes: 4 additions & 3 deletions src/XrdSciTokens/XrdSciTokensAccess.cc
Expand Up @@ -15,7 +15,6 @@
#include <fstream>
#include <unordered_map>
#include <tuple>
#include <regex>

#include "INIReader.h"
#include "picojson.h"
Expand Down Expand Up @@ -648,8 +647,10 @@ class XrdAccSciTokens : public XrdAccAuthorize, public XrdSciTokensHelper
for (auto path : config.m_base_paths) {
auto path_rule = rule;
path_rule.m_path_prefix = path + rule.m_path_prefix;
path_rule.m_path_prefix = std::regex_replace(path_rule.m_path_prefix,
std::regex("//"), "/");
auto pos = path_rule.m_path_prefix.find("//");
if (pos != std::string::npos) {
path_rule.m_path_prefix.erase(pos + 1, 1);
}
map_rules.emplace_back(path_rule);
}
}
Expand Down

0 comments on commit 48b1bf4

Please sign in to comment.