X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=src%2Ftest_filter_rewrite.cpp;h=68acc0f9c165b3c98edf38b03baaba58a22da53f;hb=c4f5c25488b0ae53e5b856a0c14a4b8c210560fc;hp=6a815599944b4e825aaac008f94a0937fff88efc;hpb=24c59a891cc78bd319b5db6c5ade450585e37ed1;p=metaproxy-moved-to-github.git diff --git a/src/test_filter_rewrite.cpp b/src/test_filter_rewrite.cpp index 6a81559..68acc0f 100644 --- a/src/test_filter_rewrite.cpp +++ b/src/test_filter_rewrite.cpp @@ -80,9 +80,13 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) " \n" " \n" " \n" - " \n" + " \n" " \n" - " \n" + " \n" + " \n" + " \n" + " \n" + " \n" " \n" " \n" "\n" @@ -112,7 +116,6 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) const char *resp_buf = "HTTP/1.1 200 OK\r\n" - "Content-Length: 441\r\n" "Content-Type: text/html\r\n" "Link: ; rel=absolute\r\n" "Link: ; rel=relative\r\n" @@ -125,7 +128,7 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) "" "" "" "" "

Welcome to our website. It doesn't make it easy to get pro" @@ -135,13 +138,13 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) "" " Another abs link" "" - "" - "" + "" + "" ""; const char *resp_expected = "HTTP/1.1 200 OK\r\n" - "Content-Length: 564\r\n" + "Content-Length: 605\r\n" "Content-Type: text/html\r\n" "Link: ; rel=absolute\r\n" "Link: ; rel=relative\r\n" @@ -154,7 +157,7 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) "" "" "" "" "

Welcome to our website. It doesn't make it easy to get pro" @@ -164,8 +167,8 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) "" " Another abs link" "" - "" - "" + "" + "" ""; Z_GDU *gdu_res; @@ -261,12 +264,6 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_2 ) " \n" " \n" " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" " \n" " \n" " \n" @@ -298,7 +295,6 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_2 ) const char *resp_buf = "HTTP/1.1 200 OK\r\n" - "Content-Length: 140\r\n" "Content-Type: application/javascript\r\n" "Link: ; rel=absolute\r\n" "Link: ; rel=relative\r\n" @@ -307,11 +303,11 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_2 ) "my.location = 'http://targetsite/images/bg.png';\n" "my.other = \"http://targetsite/images/fg.png\";\n" "my.thrd = \"other\";\n" - "// http://targetsite/images/bg.png\n"; + "// \"http://targetsite/images/bg.png\n"; const char *resp_expected = "HTTP/1.1 200 OK\r\n" - "Content-Length: 194\r\n" + "Content-Length: 195\r\n" "Content-Type: application/javascript\r\n" "Link: ; rel=absolute\r\n" "Link: ; rel=relative\r\n" @@ -320,7 +316,7 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_2 ) "my.location = 'http://proxyhost/proxypath/targetsite/images/bg.png';\n" "my.other = \"http://proxyhost/proxypath/targetsite/images/fg.png\";\n" "my.thrd = \"other\";\n" - "// http://targetsite/images/bg.png\n"; + "// \"http://targetsite/images/bg.png\n"; Z_GDU *gdu_res; mp::odr dec(ODR_DECODE);