final URIBuilder uribuilder = new URIBuilder(request.getRequestLine().getUri());
uribuilder.setScheme(this.host.getSchemeName());
uribuilder.setHost(this.host.getHostName());
uribuilder.setPort(this.host.getPort());
uribuilder.setPath("/random/1024");
location = uribuilder.build().toASCIIString();
} catch (final URISyntaxException ex) {
throw new ProtocolException("Invalid request URI", ex);
}
response.setStatusLine(ver, HttpStatus.SC_TEMPORARY_REDIRECT);
response.addHeader(new BasicHeader("Location", location));