public URI reconstructURIWithServer(Server server, URI original) {
        String host = server.getHost();
        int port = server.getPort();
        String scheme = server.getScheme();
        
        if (host.equals(original.getHost()) 
                && port == original.getPort()
                && scheme == original.getScheme()) {
            return original;
        }
        if (scheme == null) {
            scheme = original.getScheme();
        }
        if (scheme == null) {
            scheme = deriveSchemeAndPortFromPartialUri(original).first();
        }

        try {
            StringBuilder sb = new StringBuilder();
            sb.append(scheme).append("://");
            if (!Strings.isNullOrEmpty(original.getRawUserInfo())) {
                sb.append(original.getRawUserInfo()).append("@");
            }
            sb.append(host);
            if (port >= 0) {
                sb.append(":").append(port);
            }
            sb.append(original.getRawPath());
            if (!Strings.isNullOrEmpty(original.getRawQuery())) {
                sb.append("?").append(original.getRawQuery());
            }
            if (!Strings.isNullOrEmpty(original.getRawFragment())) {
                sb.append("#").append(original.getRawFragment());
            }
            URI newURI = new URI(sb.toString());
            return newURI;            
        } catch (URISyntaxException e) {
            throw new RuntimeException(e);
        }
    }
Compute the final URI from a partial URI in the request. The following steps are performed:
<ul>
<li> if host is missing and there is a load balancer, get the host/port from server chosen from load balancer
<li> if host is missing and there is no load balancer, try to derive host/port from virtual address set with the client
<li> if host is present and the authority part of the URI is a virtual address set for the client, 
and there is a load balancer, get the host/port from server chosen from load balancer
<li> if host is present but none of the above applies, interpret the host as the actual physical address
<li> if host is missing but none of the above applies, throws ClientException
</ul>

@param original Original URI passed from caller
ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/LoadBalancerContext.java