X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Ftest_filter_rewrite.cpp;h=65cb4c08fd140425d27b20e258c2f62debea150e;hb=167d92e5c6533c592b5a204b638a606ff6e2b428;hp=b16768f11f9bd832145772db7801cda08792984e;hpb=917e40f8768670e2c6da49e9d44ca92f01ea52ac;p=metaproxy-moved-to-github.git
diff --git a/src/test_filter_rewrite.cpp b/src/test_filter_rewrite.cpp
index b16768f..65cb4c0 100644
--- a/src/test_filter_rewrite.cpp
+++ b/src/test_filter_rewrite.cpp
@@ -42,14 +42,14 @@ namespace mp = metaproxy_1;
* The global testconfig is commented out, as it won't even compile
* on old Centos5 machines
struct TestConfig {
- TestConfig()
+ TestConfig()
{
- std::cout << "global setup\n";
+ std::cout << "global setup\n";
yaz_log_init_level(YLOG_ALL);
}
- ~TestConfig()
- {
- std::cout << "global teardown\n";
+ ~TestConfig()
+ {
+ std::cout << "global teardown\n";
}
};
@@ -63,12 +63,13 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 )
std::cout << "Running non-xml config test case" << std::endl;
mp::RouterChain router;
mp::filter::HttpRewrite fhr;
-
+
std::string xmlconf =
"\n"
"\n"
" \n"
+ " \n"
" \n"
" \n"
" \n"
- " \n"
+ " \n"
+ " \n"
" \n"
" \n"
+ " \n"
" \n"
" \n"
+ " to='${proto}${pxhost}/${pxpath}/${host}/${path}' />\n"
" \n"
- " \n"
- " \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
" \n"
"\n"
;
@@ -99,14 +104,14 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 )
xmlNode *root_element = xmlDocGetRootElement(doc);
fhr.configure(root_element, true, "");
xmlFreeDoc(doc);
-
+
router.append(fhr);
// create an http request
mp::Package pack;
mp::odr odr;
- Z_GDU *gdu_req = z_get_HTTP_Request_uri(odr,
+ Z_GDU *gdu_req = z_get_HTTP_Request_uri(odr,
"http://proxyhost/proxypath/targetsite/page1.html", 0, 1);
pack.request() = gdu_req;
@@ -133,14 +138,14 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 )
"xified"
""
" An absolute link"
- ""
+ ""
" Another abs link"
- ""
+ ""
"