/** * Returns the host and port of the specified request for both HTTP and HTTPS requests. The request may reflect * modifications from this or other filters. This filter instance must be currently handling the specified request; * otherwise the results are undefined. * * @param modifiedRequest a possibly-modified version of the request currently being processed * @return host and port of the specified request */ public String getHostAndPort(HttpRequest modifiedRequest) { // For HTTP requests, the host and port can be read from the request itself using the URI and/or // Host header. for HTTPS requests, the host and port are not available in the request. by using the // getHttpsRequestHostAndPort() helper method, we can retrieve the host and port for HTTPS requests. if (isHttps()) { return getHttpsRequestHostAndPort(); } else { return HttpUtil.getHostAndPortFromRequest(modifiedRequest); } }
/** * Returns the host and port of the specified request for both HTTP and HTTPS requests. The request may reflect * modifications from this or other filters. This filter instance must be currently handling the specified request; * otherwise the results are undefined. * * @param modifiedRequest a possibly-modified version of the request currently being processed * @return host and port of the specified request */ public String getHostAndPort(HttpRequest modifiedRequest) { // For HTTP requests, the host and port can be read from the request itself using the URI and/or // Host header. for HTTPS requests, the host and port are not available in the request. by using the // getHttpsRequestHostAndPort() helper method, we can retrieve the host and port for HTTPS requests. if (isHttps()) { return getHttpsRequestHostAndPort(); } else { return HttpUtil.getHostAndPortFromRequest(modifiedRequest); } }
/** * Returns the host and port of the specified request for both HTTP and HTTPS requests. The request may reflect * modifications from this or other filters. This filter instance must be currently handling the specified request; * otherwise the results are undefined. * * @param modifiedRequest a possibly-modified version of the request currently being processed * @return host and port of the specified request */ public String getHostAndPort(HttpRequest modifiedRequest) { // For HTTP requests, the host and port can be read from the request itself using the URI and/or // Host header. for HTTPS requests, the host and port are not available in the request. by using the // getHttpsRequestHostAndPort() helper method, we can retrieve the host and port for HTTPS requests. if (isHttps()) { return getHttpsRequestHostAndPort(); } else { return HttpUtil.getHostAndPortFromRequest(modifiedRequest); } }
/** * Returns the host and port of the specified request for both HTTP and HTTPS requests. The request may reflect * modifications from this or other filters. This filter instance must be currently handling the specified request; * otherwise the results are undefined. * * @param modifiedRequest a possibly-modified version of the request currently being processed * @return host and port of the specified request */ public String getHostAndPort(HttpRequest modifiedRequest) { // For HTTP requests, the host and port can be read from the request itself using the URI and/or // Host header. for HTTPS requests, the host and port are not available in the request. by using the // getHttpsRequestHostAndPort() helper method, we can retrieve the host and port for HTTPS requests. if (isHttps()) { return getHttpsRequestHostAndPort(); } else { return HttpUtil.getHostAndPortFromRequest(modifiedRequest); } }