getResourceRef().setBaseRef(new Reference(sb.toString()));
setHostRef(new Reference(sb.toString()));
    public HttpRequest(Context context, HttpServerCall httpCall) {        this.context = context;        this.clientAdded = false;        this.conditionAdded = false;        this.cookiesAdded = false;        this.entityAdded = false;        this.referrerAdded = false;        this.securityAdded = false;        this.httpCall = httpCall;        // Set the properties        setMethod(Method.valueOf(httpCall.getMethod()));        if (getHttpCall().isConfidential()) {            setConfidential(true);        } else {            // We don't want to autocreate the security data just for this            // information            // Because that will by the default value of this property if read            // by someone.        }        // Set the base reference        StringBuilder sb = new StringBuilder();        sb.append(httpCall.getServerProtocol().getSchemeName()).append("://");        sb.append(httpCall.getHostDomain());        if (httpCall.getHostPort() != httpCall.getServerProtocol()                .getDefaultPort()) {            sb.append(':').append(httpCall.getServerPort());        }        getResourceRef().setBaseRef(new Reference(sb.toString()));        // Set the resource reference        setResourceRef(new Reference(httpCall.getRequestUri()));        if (getResourceRef().isRelative()) {            getResourceRef().setBaseRef(getResourceRef().getBaseRef());            setResourceRef(getResourceRef().getTargetRef());        }    }