From: Jakub Skoczen Date: Thu, 2 May 2013 09:50:39 +0000 (+0200) Subject: Drop boost::xpressive X-Git-Tag: v1.3.59~57^2~36 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=3995708473a9be2bad986515881f8e262bdec024;p=metaproxy-moved-to-github.git 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) --- 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");