From: Jakub Skoczen Date: Wed, 8 May 2013 16:02:40 +0000 (+0200) Subject: Fix the test case X-Git-Tag: v1.3.59~57^2~13^2 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=7611584ef0d15383d61c9a0fca5b4cc6aedb6f48;p=metaproxy-moved-to-github.git Fix the test case --- diff --git a/src/filter_http_rewrite.cpp b/src/filter_http_rewrite.cpp index fd23e61..249a757 100644 --- a/src/filter_http_rewrite.cpp +++ b/src/filter_http_rewrite.cpp @@ -141,7 +141,6 @@ void yf::HttpRewrite::rewrite_body (mp::odr & o, char **content_buf, int *conten const spair_vec & uri_pats, const std::vector > & groups_bynum) const { - std::cout << "About to rewrite body: " << *content_buf; if (*content_buf) { std::string body(*content_buf); diff --git a/src/test_filter_rewrite.cpp b/src/test_filter_rewrite.cpp index 8e53981..430e784 100644 --- a/src/test_filter_rewrite.cpp +++ b/src/test_filter_rewrite.cpp @@ -94,11 +94,9 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) //create the http response - /* response, content */ const char *resp_buf = - /*123456789012345678 */ "HTTP/1.1 200 OK\r\n" - "Content-Length: 50\r\n" + "Content-Length: 441\r\n" "Content-Type: text/html\r\n" "Link: ; rel=absolute\r\n" "Link: ; rel=relative\r\n" @@ -121,11 +119,9 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) "" ""; - /* response, content */ - const char *resp_result = - /*123456789012345678 */ + const char *resp_expected = "HTTP/1.1 200 OK\r\n" - "Content-Length: 50\r\n" + "Content-Length: 521\r\n" "Content-Type: text/html\r\n" "Link: ; rel=absolute\r\n" "Link: ; rel=relative\r\n" @@ -141,11 +137,11 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) "" "

Welcome to our website. It doesn't make it easy to get pro" "xified" - "" + "" " An absolute link" "