final Reference reference = request.getResourceRef();
if (reference.getBaseRef() == null) {
reference.setBaseRef(reference.getHostIdentifier());
}
request.setOriginalRef(reference.getTargetRef());
final Restlet connector = getClientConnector();
if (shouldAccessWithoutTcp()) {
final String hostDomain = request.getResourceRef().getHostDomain();
getHttpHeaders(request).add("host", hostDomain);
}
Response response = new Response(request);
connector.handle(request, response);
if (!usingTcp && request.getMethod().equals(Method.HEAD)) {
response.setEntity(new WrapperRepresentation(response.getEntity()) {
@Override
public ReadableByteChannel getChannel() throws IOException {