ServerConfig config = new ServerConfig();
ServiceUrl serviceUrl = new ServiceUrl(config);
serviceUrl.setPath("/examples/");
serviceUrl.setType(ServiceType.REVERSE);
serviceUrl.setHost(new URL("http://localhost/examples/servlets"));
ReverseUrl reverseUrl = new DefaultReverseUrl(serviceUrl);
reverseUrl.setReverse(new URL("http://localhost:8080/examples/"));
HttpResponse response = new BasicHttpResponse(
new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 302, "Moved Temporarily"));
response.setHeader("Content-Location", "http://localhost/examples/servlets/");
ReverseUtils.rewriteContentLocationHeader(null, response, reverseUrl);