" </request>\n"
" <response verbose=\"1\">\n"
" <rule name=\"null\"/>\n"
+ " <rule name=\"cx\">\n"
+ " <rewrite from='^cx' to='cy'/>\n"
+ " </rule>\n"
" <rule name=\"url\">\n"
" <rewrite from='foo' to='bar'/>\n"
- " <rewrite from='^cx' to='cy'/>\n"
" <rewrite from='"
"(?<proto>https?://)(?<host>[^/?# "'>]+)/(?<path>[^ "'>]+)'\n"
" to='${proto}${pxhost}/${pxpath}/${host}/${path}' />\n"
" <within tag=\"body\" attr=\"background\" rule=\"null\"/>\n"
" <within tag=\"script\" attr=\"#text\" type=\"quoted-literal\" rule=\"url\"/>\n"
" <within tag=\"style\" attr=\"#text\" rule=\"url\"/>\n"
- " <within attr=\"href,src\" rule=\"url\"/>\n"
+ " <within attr=\"href|src\" rule=\"url,cx\"/>\n"
+ " <within attr=\"onclick\" type=\"quoted-literal\" rule=\"url\"/>\n"
" </content>\n"
" <content type=\"quoted-literal\" mime=\".*javascript\">\n"
" <within rule=\"url\"/>\n"
"<a target=_blank href=\"http://targetsite/page3.html\">"
" Another abs link</a>"
"<a href=\"/docs/page4.html\" />"
- "<a href=\"cxcx\" />"
- "<a href=\"cx \" />"
+ "<A href=\"cxcx\" />"
+ "<a HREF=\"cx \" onclick=\"foo("foo");\"/>"
"</body></html>";
const char *resp_expected =
"HTTP/1.1 200 OK\r\n"
- "Content-Length: 573\r\n"
+ "Content-Length: 605\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"
"<a target=_blank href=\"http://proxyhost/proxypath/targetsite/page3.html\">"
" Another abs link</a>"
"<a href=\"/docs/page4.html\"/>"
- "<a href=\"cycx\"/>"
- "<a href=\"cy \"/>"
+ "<A href=\"cycx\"/>"
+ "<a HREF=\"cy \" onclick=\"foo("bar");\"/>"
"</body></html>";
Z_GDU *gdu_res;
" <content type=\"headers\">\n"
" <within header=\"link\" rule=\"url\"/>\n"
" </content>\n"
- " <content type=\"html\" mime=\"text/xml|text/html\">\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"
- " </content>\n"
" <content type=\"quoted-literal\" mime=\".*javascript\">\n"
" <within rule=\"url\"/>\n"
" </content>\n"