From: Adam Dickmeiss Date: Mon, 1 Jul 2013 13:23:23 +0000 (+0200) Subject: boost::smatch part of Replace object too X-Git-Tag: v1.3.59~30 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=dcf44e3b0a3feaa4bb651f3a7acaccdae35c2c46;p=metaproxy-moved-to-github.git boost::smatch part of Replace object too --- diff --git a/src/filter_http_rewrite.cpp b/src/filter_http_rewrite.cpp index d4fdbcb..a615c2f 100644 --- a/src/filter_http_rewrite.cpp +++ b/src/filter_http_rewrite.cpp @@ -41,11 +41,12 @@ namespace metaproxy_1 { class HttpRewrite::Replace { public: boost::regex re; + boost::smatch what; std::string recipe; std::map group_index; const std::string search_replace( std::map & vars, - const std::string & txt) const; + const std::string & txt); std::string sub_vars( const std::map & vars) const; void parse_groups(std::string pattern); @@ -56,7 +57,7 @@ namespace metaproxy_1 { std::list replace_list; const std::string test_patterns( std::map & vars, - const std::string & txt) const; + const std::string & txt); }; class HttpRewrite::Within { public: @@ -389,9 +390,9 @@ void yf::HttpRewrite::Event::text(const char *value, int len) */ const std::string yf::HttpRewrite::Rule::test_patterns( std::map & vars, - const std::string & txt) const + const std::string & txt) { - std::list::const_iterator it = replace_list.begin(); + std::list::iterator it = replace_list.begin(); for (; it != replace_list.end(); it++) { @@ -403,9 +404,8 @@ const std::string yf::HttpRewrite::Rule::test_patterns( const std::string yf::HttpRewrite::Replace::search_replace( std::map & vars, - const std::string & txt) const + const std::string & txt) { - boost::smatch what; std::string::const_iterator start, end; start = txt.begin(); end = txt.end();