final HttpContext context) throws HttpException, IOException {
ProtocolVersion ver = request.getRequestLine().getProtocolVersion();
String uri = request.getRequestLine().getUri();
if (uri.startsWith("/circular-oldlocation")) {
response.setStatusLine(ver, HttpStatus.SC_MOVED_TEMPORARILY);
response.addHeader(new BasicHeader("Location", "/circular-location2"));
} else if (uri.startsWith("/circular-location2")) {
response.setStatusLine(ver, HttpStatus.SC_MOVED_TEMPORARILY);
response.addHeader(new BasicHeader("Location", "/circular-oldlocation"));
} else {
response.setStatusLine(ver, HttpStatus.SC_NOT_FOUND);
}
}