From 7611584ef0d15383d61c9a0fca5b4cc6aedb6f48 Mon Sep 17 00:00:00 2001 From: Jakub Skoczen Date: Wed, 8 May 2013 18:02:40 +0200 Subject: [PATCH] Fix the test case --- src/filter_http_rewrite.cpp | 1 - src/test_filter_rewrite.cpp | 40 +++++++++++++++++++++------------------- 2 files changed, 21 insertions(+), 20 deletions(-) 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" "