From 3995708473a9be2bad986515881f8e262bdec024 Mon Sep 17 00:00:00 2001 From: Jakub Skoczen Date: Thu, 2 May 2013 11:50:39 +0200 Subject: [PATCH] Drop boost::xpressive and revert back to boost::regex which seems to parse Perl-like capture groups just fine (unlike xpressive which wnats Python style, sic) --- src/test_filter_rewrite.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/test_filter_rewrite.cpp b/src/test_filter_rewrite.cpp index 40ab6ba..3ff4a70 100644 --- a/src/test_filter_rewrite.cpp +++ b/src/test_filter_rewrite.cpp @@ -25,9 +25,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "router_chain.hpp" #include -#define BOOST_REGEX_MATCH_EXTRA - -#include +#include #include #define BOOST_AUTO_TEST_MAIN @@ -36,7 +34,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include using namespace boost::unit_test; -using namespace boost::xpressive; namespace mp = metaproxy_1; class FilterHeaderRewrite: public mp::filter::Base { @@ -78,8 +75,8 @@ public: void rewrite_req_header(Z_HTTP_Header *header) const { //exec regex against value - sregex re = sregex::compile(req_uri_rx); - smatch what; + boost::regex re(req_uri_rx); + boost::smatch what; std::string hvalue(header->value); std::map vars; if (regex_match(hvalue, what, re)) @@ -251,7 +248,7 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_2 ) FilterHeaderRewrite fhr; fhr.configure( - ".*?(?P[^:]+):(?P\\d+).*", + ".*?(?[^:]+):(?\\d+).*", "http://${host}:${port}/somepath", ".*(localhost).*", "http:://g"); -- 1.7.10.4