public void handle(
final HttpRequest request,
final HttpResponse response,
final HttpContext context) throws HttpException, IOException {
final HttpInetConnection conn = (HttpInetConnection) context.getAttribute(
HttpCoreContext.HTTP_CONNECTION);
final ProtocolVersion ver = request.getRequestLine().getProtocolVersion();
final String uri = request.getRequestLine().getUri();
if (uri.equals("/oldlocation/")) {
final String redirectUrl = this.schemeName + "://localhost:" + conn.getLocalPort() + "/newlocation/";
response.setStatusLine(ver, this.statuscode);
response.addHeader(new BasicHeader("Location", redirectUrl));
response.addHeader(new BasicHeader("Connection", "close"));
} else if (uri.equals("/newlocation/")) {
response.setStatusLine(ver, HttpStatus.SC_OK);