+ //create the http response
+
+ const char *resp_buf =
+ "HTTP/1.1 200 OK\r\n"
+ "Content-Length: 441\r\n"
+ "Content-Type: text/html\r\n"
+ "Link: <http://targetsite/file.xml>; rel=absolute\r\n"
+ "Link: </dir/file.xml>; rel=relative\r\n"
+ "\r\n"
+ "<html><head><title>Hello proxy!</title>"
+ "<style>"
+ "body {"
+ " background-image:url('http://targetsite/images/bg.png');"
+ "}"
+ "</style>"
+ "</head>"
+ "<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"
+ "<a href=\"http://targetsite/page2.html\">"
+ " An absolute link</a>"
+ "<a target=_blank href=\"http://targetsite/page3.html\">"
+ " Another abs link</a>"
+ "<a href=\"/docs/page4.html\" />"
+ "<a href=\"cxcx\" />"
+ "<a href=\"cx \" />"
+ "</body></html>";
+
+ const char *resp_expected =
+ "HTTP/1.1 200 OK\r\n"
+ "Content-Length: 564\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"
+ "\r\n"
+ "<html><head><title>Hello proxy!</title>"
+ "<style>"
+ "body {"
+ " background-image:url('http://proxyhost/proxypath/targetsite/images/bg.png');"
+ "}"
+ "</style>"
+ "</head>"
+ "<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\">"
+ " Another abs link</a>"
+ "<a href=\"/docs/page4.html\"/>"
+ "<a href=\"cycx\"/>"
+ "<a href=\"cy \"/>"
+ "</body></html>";
+
+ int r;
+ Z_GDU *gdu_res;
+ ODR dec = odr_createmem(ODR_DECODE);
+ odr_setbuf(dec, (char *) resp_buf, strlen(resp_buf), 0);
+ r = z_GDU(dec, &gdu_res, 0, 0);
+
+ BOOST_CHECK(r);
+ if (r)
+ {
+ BOOST_CHECK_EQUAL(gdu_res->which, Z_GDU_HTTP_Response);
+ }
+
+ pack.response() = gdu_res;
+