From dcf44e3b0a3feaa4bb651f3a7acaccdae35c2c46 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 1 Jul 2013 15:23:23 +0200 Subject: [PATCH] boost::smatch part of Replace object too --- src/filter_http_rewrite.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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(); -- 1.7.10.4