X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;ds=sidebyside;f=src%2Ffilter_http_rewrite.cpp;h=29ce8b05eb5185328aa30068674d022bb95de2f7;hb=c26efced52c043f96c6560b453975d77ebde1b0f;hp=e64fb3642f9c315cca1dc053661c293c123bf569;hpb=67e481dac76e773799e3e18c87d29f0a210cbfb1;p=metaproxy-moved-to-github.git diff --git a/src/filter_http_rewrite.cpp b/src/filter_http_rewrite.cpp index e64fb36..29ce8b0 100644 --- a/src/filter_http_rewrite.cpp +++ b/src/filter_http_rewrite.cpp @@ -360,13 +360,14 @@ static void configure_rules(const xmlNode *ptr, yf::HttpRewrite::spair_vec & des + std::string((const char *) attr->name) + " in rewrite section of http_rewrite"); } + std::cout << "Found rewrite rule from=" << from << " to " << to << std::endl; if (!from.empty()) dest.push_back(std::make_pair(from, to)); } else { throw mp::filter::FilterException - ("Bad element " + ("Bad element o" + std::string((const char *) ptr->name) + " in http_rewrite1 filter"); } @@ -384,11 +385,12 @@ void yf::HttpRewrite::configure(const xmlNode * ptr, bool test_only, continue; else if (!strcmp((const char *) ptr->name, "request")) { - configure_rules(ptr->children, req_uri_pats); + std::cout << "Found request rule" << std::endl; + configure_rules(ptr, req_uri_pats); } else if (!strcmp((const char *) ptr->name, "response")) { - configure_rules(ptr->children, res_uri_pats); + configure_rules(ptr, res_uri_pats); } else { @@ -398,6 +400,7 @@ void yf::HttpRewrite::configure(const xmlNode * ptr, bool test_only, + " in http_rewrite1 filter"); } } + configure(req_uri_pats, res_uri_pats); } static mp::filter::Base* filter_creator()