"<?xml version='1.0'?>\n"
"<filter xmlns='http://indexdata.com/metaproxy'\n"
" id='rewrite1' type='http_rewrite'>\n"
- " <request>\n"
+ " <request verbose=\"1\">\n"
" <rule name=\"null\"/>\n"
" <rule name=\"url\">\n"
" <rewrite from='"
" <within header=\"link\" rule=\"null\"/>\n"
" <within reqline=\"1\" rule=\"url\"/>\n"
" </request>\n"
- " <response>\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"
" </rule>\n"
" <within header=\"link\" rule=\"url\"/>\n"
- " <within tag=\"script\" attr=\"src,#text\" rule=\"url\"/>\n"
- " <within tag=\"style\" rule=\"url\"/>\n"
+ " <within tag=\"body\" attr=\"background\" rule=\"null\"/>\n"
+ " <within tag=\"script\" attr=\"#text\" rule=\"url\"/>\n"
+ " <within tag=\"style\" attr=\"#text\" rule=\"url\"/>\n"
" <within attr=\"href,src\" rule=\"url\"/>\n"
" </response>\n"
"</filter>\n"
"}"
"</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"
const char *resp_expected =
"HTTP/1.1 200 OK\r\n"
- "Content-Length: 522\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"
"}"
"</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"
"<a href=\"http://proxyhost/proxypath/targetsite/page2.html\">"
" An absolute link</a>"
- "<a target=\"_blank\" href=\"http://proxyhost/proxypath/targetsite/page3.html\">"
+ "<a target=_blank href=\"http://proxyhost/proxypath/targetsite/page3.html\">"
" Another abs link</a>"
"<a href=\"/docs/page4.html\"/>"
"</body></html>";