From 3965a0918cec02fe4ef202638fd714150b93a0ba Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 19 Jun 2013 11:26:21 +0200 Subject: [PATCH] http_rewrite: Avoid ? regex'es. They don't work in Boost 1.33 (rather old). --- src/filter_http_rewrite.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/filter_http_rewrite.cpp b/src/filter_http_rewrite.cpp index 1581694..d21b4c8 100644 --- a/src/filter_http_rewrite.cpp +++ b/src/filter_http_rewrite.cpp @@ -256,9 +256,11 @@ void yf::HttpRewrite::Rule::parse_groups() int gnum = 0; bool esc = false; const std::string & str = regex; + std::string res; yaz_log(YLOG_LOG, "Parsing groups from '%s'", str.c_str()); for (size_t i = 0; i < str.size(); ++i) { + res += str[i]; if (!esc && str[i] == '\\') { esc = true; @@ -273,7 +275,9 @@ void yf::HttpRewrite::Rule::parse_groups() if (i+1 < str.size() && str[i+1] == ':') //non-capturing { if (gnum > 0) gnum--; + res += str[i]; i++; + res += str[i]; continue; } if (i+1 < str.size() && str[i+1] == 'P') //optional, python @@ -307,6 +311,7 @@ void yf::HttpRewrite::Rule::parse_groups() } esc = false; } + regex = res; } std::string yf::HttpRewrite::Rule::sub_vars ( -- 1.7.10.4