projects
/
metaproxy-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1cdeee0
)
Testing for all Replace rules in use
author
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 1 Jul 2013 13:46:43 +0000
(15:46 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 1 Jul 2013 13:46:43 +0000
(15:46 +0200)
src/test_filter_rewrite.cpp
patch
|
blob
|
history
diff --git
a/src/test_filter_rewrite.cpp
b/src/test_filter_rewrite.cpp
index
7df4d0b
..
c38c022
100644
(file)
--- a/
src/test_filter_rewrite.cpp
+++ b/
src/test_filter_rewrite.cpp
@@
-84,6
+84,7
@@
BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 )
" <response verbose=\"1\">\n"
" <rule name=\"null\"/>\n"
" <rule name=\"url\">\n"
" <response verbose=\"1\">\n"
" <rule name=\"null\"/>\n"
" <rule name=\"url\">\n"
+ " <rewrite from='foo' to='bar'/>\n"
" <rewrite from='"
"(?<proto>https?://)(?<host>[^/?# "'>]+)/(?<path>[^ "'>]+)'\n"
" to='${proto}${pxhost}/${pxpath}/${host}/${path}' />\n"
" <rewrite from='"
"(?<proto>https?://)(?<host>[^/?# "'>]+)/(?<path>[^ "'>]+)'\n"
" to='${proto}${pxhost}/${pxpath}/${host}/${path}' />\n"
@@
-133,7
+134,9
@@
BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 )
"}"
"</style>"
"</head>"
"}"
"</style>"
"</head>"
- "<script>var jslink=\"http://targetsite/webservice.xml\";</script>"
+ "<script>var jslink=\"http://targetsite/webservice.xml\";"
+ "var some=foo;"
+ "</script>"
"<body>"
"<p>Welcome to our website. It doesn't make it easy to get pro"
"xified"
"<body>"
"<p>Welcome to our website. It doesn't make it easy to get pro"
"xified"
@@
-146,7
+149,7
@@
BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 )
const char *resp_expected =
"HTTP/1.1 200 OK\r\n"
const char *resp_expected =
"HTTP/1.1 200 OK\r\n"
- "Content-Length: 520\r\n"
+ "Content-Length: 533\r\n"
"Content-Type: text/html\r\n"
"Link: <http://proxyhost/proxypath/targetsite/file.xml>; rel=absolute\r\n"
"Link: </dir/file.xml>; rel=relative\r\n"
"Content-Type: text/html\r\n"
"Link: <http://proxyhost/proxypath/targetsite/file.xml>; rel=absolute\r\n"
"Link: </dir/file.xml>; rel=relative\r\n"
@@
-158,7
+161,9
@@
BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 )
"}"
"</style>"
"</head>"
"}"
"</style>"
"</head>"
- "<script>var jslink=\"http://proxyhost/proxypath/targetsite/webservice.xml\";</script>"
+ "<script>var jslink=\"http://proxyhost/proxypath/targetsite/webservice.xml\";"
+ "var some=bar;"
+ "</script>"
"<body>"
"<p>Welcome to our website. It doesn't make it easy to get pro"
"xified"
"<body>"
"<p>Welcome to our website. It doesn't make it easy to get pro"
"xified"