Returns the absolute redirect URI, using the {@link HttpServletRequest} to generate the absolute URL
if the configured URL is not absolute.
@param request
@return
500213
private URI redirectUriUsing(HttpServletRequest request) {
        URI redirect;

        URI redirectUri = oAuth2ServiceProperties.getRedirectUri();
        if (!redirectUri.isAbsolute()) {
            redirect = UriBuilder.fromPath(request.getContextPath())
                    .path(redirectUri.toString())
                    .scheme(request.getScheme())
                    .host(request.getServerName())
                    .port(request.getServerPort())
                    .build();
        } else {
            redirect = redirectUri;
        }

            return redirect;
    }
102963
public static String getRequestURI(HttpServletRequest httpRequest) {
        final StringBuilder url = new StringBuilder(100).append(httpRequest.getRequestURI());
        if (httpRequest.getQueryString() != null) {
            url.append('?').append(httpRequest.getQueryString());
        }

        return url.toString();
    }
594642
@SuppressWarnings("null")
  protected final Resource getRootResource(SlingHttpServletRequest request) {
    String path = RequestParam.get(request, RP_PATH);
    if (StringUtils.isEmpty(path) && request.getResource() != null) {
      path = request.getResource().getPath();
    }
    if (StringUtils.isNotEmpty(path)) {
      path = StringUtils.removeEnd(path, "/" + JcrConstants.JCR_CONTENT);
      return request.getResourceResolver().getResource(path);
    }
    return null;
  }
359366
public static ActionResolver getCurrentActionResolver( HttpServletRequest request )
    {
        ServletContext servletContext = InternalUtils.getServletContext( request );
        return getCurrentActionResolver( request, servletContext );
    }
259928
private URL convertRequestToUrl(InternalRequest request) {
        String resourcePath = HttpUtils.normalizePath(request.getUri().getPath());

        // Removed the padding "/" that was already added into the request's resource path.
        if (resourcePath.startsWith("/")) {
            resourcePath = resourcePath.substring(1);
        }

        // Some http client libraries (e.g. Apache HttpClient) cannot handle
        // consecutive "/"s between URL authority and path components.
        // So we escape "////..." into "/%2F%2F%2F...", in the same way as how
        // we treat consecutive "/"s in AmazonS3Client#presignRequest(...)
        String urlPath = "/" + resourcePath;
        urlPath = urlPath.replaceAll("(?<=/)/", "%2F");
        String urlString = this.getEndpoint() + urlPath;

        boolean firstParam = true;
        for (String param : request.getParameters().keySet()) {
            if (firstParam) {
                urlString += "?";
                firstParam = false;
            } else {
                urlString += "&";
            }

            String value = request.getParameters().get(param);
            urlString += param + "=" + HttpUtils.normalize(value);
        }

        String authorization = request.getHeaders().get(Headers.AUTHORIZATION);
        if (authorization != null) {
            if (firstParam) {
                urlString += "?";
            } else {
                urlString += "&";
            }
            urlString += "authorization" + "=" + HttpUtils.normalize(authorization);
        }

        try {
            return new URL(urlString);
        } catch (MalformedURLException e) {
            throw new BceClientException("Unable to convert request to well formed URL: " + e.getMessage(), e);
        }
    }
724681
public static String findRouteOrRequestUriTransport(Request request) {
		RouteHeader route = (RouteHeader) request.getHeader(RouteHeader.NAME);
		if(route != null) {
			URI uri = route.getAddress().getURI();
			return findURITransport(uri, request.getContentLength().getContentLength());
		}
		URI ruri = request.getRequestURI();
		return findURITransport(ruri, request.getContentLength().getContentLength());
	}
1329367
public static int getPage(final HttpServletRequest request) {
        int ret = 1;
        final String p = request.getParameter("p");
        if (Strings.isNumeric(p)) {
            try {
                ret = Integer.parseInt(p);
            } catch (final Exception e) {
                // ignored
            }
        }

        if (1 > ret) {
            ret = 1;
        }

        return ret;
    }
433933
public static HttpServletRequest getHttpServletRequest(final Request request)
	{
		final WebRequest webRequest = (WebRequest)request;
		final HttpServletRequest httpServletRequest = (HttpServletRequest)webRequest
			.getContainerRequest();
		return httpServletRequest;
	}
82173
public static String getURIForCurrentDispatch (HttpServletRequest req){
          String includeURI = (String) req.getAttribute(WebAppRequestDispatcher.REQUEST_URI_INCLUDE_ATTR);
          if (includeURI == null)
                 return req.getRequestURI();
          else 
                 return includeURI;
   }
745460
public static HttpHost getHost(HttpRequest request) {
        HttpHost httpHost = UriUtils.extractHost(request.getRequestLine().getUri());
        String scheme = httpHost.getSchemeName();
        String host = httpHost.getHostName();
        int port = httpHost.getPort();
        Header[] headers = request.getHeaders(HttpHeaders.HOST);
        if (headers != null && headers.length != 0) {
            String headerValue = headers[0].getValue();
            String[] splitted = headerValue.split(":");
            host = splitted[0];
            if (splitted.length > 1) {
                port = Integer.parseInt(splitted[1]);
            } else {
                port = -1;
            }
        }
        return new HttpHost(host, port, scheme);
    }
312765
public static String getFullURL(HttpServletRequest request) {
        if (request == null) {
            return null;
        }
        String url = request.getRequestURL().toString();
        String QueryString = request.getQueryString();
        if ((QueryString != null) && (QueryString.length() > 0)) {
            url = url + "?" + QueryString;
        }
        return url;
    }
504714
public static String getError(final HttpServletRequest request) {
		StringBuilder sb = (StringBuilder) request.getAttribute(ERROR_KEY);
		if (sb == null) {
			return "";
		}
		return sb.toString();
	}
56487
def get(self, request, *args, **kwargs):
        
        entry = self.get_object()
        return HttpResponsePermanentRedirect(entry.get_absolute_url())
940599
public static Tag uri(HttpRequest request) {
		return Tag.of("uri", ensureLeadingSlash(stripUri(request.getURI().toString())));
	}
1267986
@Override
    public IPortalUrlBuilder getDefaultUrl(HttpServletRequest request) {
        final IUrlNodeSyntaxHelper urlNodeSyntaxHelper =
                this.urlNodeSyntaxHelperRegistry.getCurrentUrlNodeSyntaxHelper(request);
        final String defaultLayoutNodeId = urlNodeSyntaxHelper.getDefaultLayoutNodeId(request);
        return this.getPortalUrlBuilderByLayoutNode(request, defaultLayoutNodeId, UrlType.RENDER);
    }
219722
@Nonnull
  public static StringBuffer getRequestRequestURL (@Nullable final HttpServletRequest aRequest)
  {
    StringBuffer ret = null;
    if (aRequest != null)
      try
      {
        ret = aRequest.getRequestURL ();
      }
      catch (final Exception ex)
      {
        // fall through
        if (isLogExceptions ())
          if (LOGGER.isWarnEnabled ())
            LOGGER.warn ("[ServletHelper] Failed to determine request URL of HTTP request", ex);
      }
    return ret != null ? ret : new StringBuffer ();
  }
949804
private String getRequestPath(HttpServletRequest request) {
		String url = request.getServletPath();

		if (request.getPathInfo() != null) {
			url += request.getPathInfo();
		}

		return url;
	}