From fc60434912ceab56484a525b650089310526746f Mon Sep 17 00:00:00 2001 From: Jakub Skoczen Date: Wed, 8 May 2013 16:49:30 +0200 Subject: [PATCH] Try to comapte buffers --- src/filter_http_rewrite.cpp | 1 + src/test_filter_rewrite.cpp | 44 +++++++++++++++++++++++++------------------ 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/src/filter_http_rewrite.cpp b/src/filter_http_rewrite.cpp index 249a757..fd23e61 100644 --- a/src/filter_http_rewrite.cpp +++ b/src/filter_http_rewrite.cpp @@ -141,6 +141,7 @@ 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 68b63f7..8e53981 100644 --- a/src/test_filter_rewrite.cpp +++ b/src/test_filter_rewrite.cpp @@ -98,10 +98,10 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) const char *resp_buf = /*123456789012345678 */ "HTTP/1.1 200 OK\r\n" - "Content-Length: 3000\r\n" + "Content-Length: 50\r\n" "Content-Type: text/html\r\n" - "Link: ; rel=absolute\r\r" - "Link: ; rel=relative\r\r" + "Link: ; rel=absolute\r\n" + "Link: ; rel=relative\r\n" "\r\n" "Hello proxy!" "