Calculate and return the URI to be sent ( proxy purpose )
@param the local URI
@return URI to be used in the HTTP request
161335
function makeUri($uri) {
      $a = parse_url($uri);

      if ( (isset($a['scheme'])) && (isset($a['host'])) ) {
        $this->url = $a;
      } else {
        unset($this->url['query']);
        unset($this->url['fragment']);
        $this->url = array_merge($this->url, $a);
      }

      if ($this->useProxy) {
        $requesturi = 'http://' . $this->url['host'] . (empty($this->url['port']) ? '' : ':' . $this->url['port']) . $this->url['path'] . (empty($this->url['query']) ? '' : '?' . $this->url['query']);
      } else {
        $requesturi = $this->url['path'] . (empty($this->url['query']) ? '' : '?' . $this->url['query']);
      }

      return $requesturi;
    }
74146
@Override
    public String getRequestURI() {
        if (null == this.strippedURI) {
            this.strippedURI = SessionInfo.stripURL(this.request.getURI(), this.sessionData);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "getRequestURI: " + this.strippedURI);
        }
        return this.strippedURI;
    }
1267292
@CheckReturnValue
  static URI createUri(String scheme, InetAddress address, int port) throws URISyntaxException {
    checkNotNull(address);
    return new URI(
        scheme,
        null /* userInfo */,
        InetAddresses.toUriString(address),
        port,
        null /* path */,
        null /* query */,
        null /* fragment */);
  }
567733
URI buildUri(String relativePath)
    {    
        URI uri = null;
        
        try
        {    
            uri = new URI(buildUrl(relativePath));   
        }
        catch (URISyntaxException e)
        {           
            logger.severe("Problem constructing URI: "+e.getClass().getName()+e.getMessage());
        }

        return uri;
    }
196390
public static Response get(URI uri) throws URISyntaxException, HttpException {
        return send(new HttpGet(uri), null, null);
    }
1156175
public Server getServerByUri(final String uri) {
        for (Server server : SERVERS) {
            if (server.getManagementUri().equals(uri)) {
                return server;
            }
        }

        return null;
    }
638555
public static URI getRequestUri(Response response, AddressFactory addressFactory) throws ParseException {
		final ContactHeader contact = ((ContactHeader) response.getHeader(ContactHeader.NAME));
		return (contact != null) ? (URI) contact.getAddress().getURI().clone() : null;
	}
1174606
def parse_proxy(uri)
      proxy = URI.parse(uri)
      self.proxy_host = proxy.host
      self.proxy_port = proxy.port
      self.proxy_user = proxy.user
      self.proxy_password = proxy.password
    end
917892
public static String getUrl(final HttpServletRequest request) {
    try {
      final StringBuffer sb = request.getRequestURL();
      if (sb != null) {
        return sb.toString();
      }

      // Presumably portlet - see what happens with uri
      return request.getRequestURI();
    } catch (Throwable t) {
      return "BogusURL.this.is.probably.a.portal";
    }
  }
424446
public String getUri() {
        final Object requestUri = getHeader(HttpMessageHeaders.HTTP_REQUEST_URI);

        if (requestUri != null) {
            return requestUri.toString();
        }

        return null;
    }
916403
@Nullable
  public static URI getAsURI (@Nullable final String sURI)
  {
    if (StringHelper.hasText (sURI))
      try
      {
        return new URI (sURI);
      }
      catch (final URISyntaxException ex)
      {
        // fall-through
        if (GlobalDebug.isDebugMode ())
          if (LOGGER.isWarnEnabled ())
            LOGGER.warn ("Debug warn: failed to convert '" + sURI + "' to a URI!");
      }
    return null;
  }
10105
public void proxyTo(final List<? extends URI> uris) {
		for (URI uri : uris)
		{
			if(uri == null) {
				throw new NullPointerException("URI can't be null");
			}
			if(!JainSipUtils.checkScheme(uri.toString())) {
				throw new IllegalArgumentException("Scheme " + uri.getScheme() + " is not supported");
			}
			final ProxyBranchImpl branch = new ProxyBranchImpl((URI) uri, this);
			branch.setRecordRoute(recordRoutingEnabled);
			branch.setRecurse(recurse);
			this.proxyBranches.put(uri, branch);
		}
		startProxy();
	}
713142
public SipURI getRecordRouteURI() {
		if(!this.recordRoutingEnabled) throw new IllegalStateException("You must setRecordRoute(true) before getting URI");
		if(recordRouteURI == null && recordRouteURIString != null) {
			try {
				recordRouteURI = new SipURIImpl(((SipURIImpl)sipFactoryImpl.createURI(recordRouteURIString)).getSipURI(), ModifiableRule.ProxyRecordRouteNotModifiable);
				recordRouteURIString = null;
			} catch (ServletParseException e) {
				logger.error("A problem occured while setting the target URI while proxying a request " + recordRouteURIString, e);
				return null;
			}
		}
		return this.recordRouteURI;
	}
74056
def _uri(self, url):
        """"""
        if url and not url.startswith('/'):
            # Then this must be a proxy request.
            return url
        uri = "{0}://{1}{2}{3}".format(
            self._protocol,
            self.real_connection.host,
            self._port_postfix(),
            url,
        )
        return uri
1178746
public RequestHeader withUri(URI uri) {
        return new RequestHeader(method, uri, protocol, acceptedResponseProtocols, principal, headers, lowercaseHeaders);
    }
284180
public URI forURL(URI uri) {
        QueryStringEncoder encoder = new QueryStringEncoder(uri.toString());
        for (Map.Entry<String, Object> e : params.entrySet()) {
            encoder.addParam(e.getKey(), String.valueOf(e.getValue()));
        }
        try {
            return encoder.toUri();
        } catch (URISyntaxException e) {
            throw new IllegalArgumentException("Cannot construct a query string from the given params. " +
                    "An invalid parameter was used.");
        }
    }
661962
public URI toEmfUri(final java.net.URI netUri) {
    URI _xblockexpression = null;
    {
      final String decoded = this.toDecodedString(netUri);
      final URI uri = URI.createURI(decoded);
      final URI result = this.withEmptyAuthority(uri);
      _xblockexpression = result;
    }
    return _xblockexpression;
  }