std::string recipe;
std::map<int, std::string> group_index;
const std::string search_replace(
std::string recipe;
std::map<int, std::string> group_index;
const std::string search_replace(
const std::string & txt) const;
std::string sub_vars(
const std::map<std::string, std::string> & vars) const;
const std::string & txt) const;
std::string sub_vars(
const std::map<std::string, std::string> & vars) const;
std::map<std::string, std::string> & vars,
const std::string & txt) const
{
std::map<std::string, std::string> & vars,
const std::string & txt) const
{
std::string res;
yaz_log(YLOG_LOG, "Parsing groups from '%s'", str.c_str());
for (size_t i = 0; i < str.size(); ++i)
std::string res;
yaz_log(YLOG_LOG, "Parsing groups from '%s'", str.c_str());
for (size_t i = 0; i < str.size(); ++i)
const struct _xmlAttr *attr;
for (attr = p->properties; attr; attr = attr->next)
{
if (!strcmp((const char *) attr->name, "from"))
const struct _xmlAttr *attr;
for (attr = p->properties; attr; attr = attr->next)
{
if (!strcmp((const char *) attr->name, "from"))
else if (!strcmp((const char *) attr->name, "to"))
replace.recipe = mp::xml::get_text(attr->children);
else
else if (!strcmp((const char *) attr->name, "to"))
replace.recipe = mp::xml::get_text(attr->children);
else
+ " in rewrite section of http_rewrite");
}
yaz_log(YLOG_LOG, "Found rewrite rule from '%s' to '%s'",
+ " in rewrite section of http_rewrite");
}
yaz_log(YLOG_LOG, "Found rewrite rule from '%s' to '%s'",
- replace.regex.c_str(), replace.recipe.c_str());
- replace.parse_groups();
- if (!replace.regex.empty())
+ from.c_str(), replace.recipe.c_str());
+ if (!from.empty())
+ {
+ replace.parse_groups(from);