@Test public void constructRequestUrl_NON_STANDARD_PORT() { when(request.getHeader("X-FORWARDED-PROTO")).thenReturn("https"); when(request.getHeader("X-FORWARDED-HOST")).thenReturn("saos.org.pl"); when(request.getIntHeader("X-FORWARDED-PORT")).thenReturn(773); when(request.getRequestURI()).thenReturn("/search"); assertEquals("https: }
public static String constructRequestUrl(HttpServletRequest request) { StringBuilder url = new StringBuilder(); url.append(constructRequestBaseUrl(request)); String urlPath = request.getRequestURI(); url.append(urlPath); return url.toString(); }
HttpServletRequestUtils { public static String constructRequestUrl(HttpServletRequest request) { StringBuilder url = new StringBuilder(); url.append(constructRequestBaseUrl(request)); String urlPath = request.getRequestURI(); url.append(urlPath); return url.toString(); } }
HttpServletRequestUtils { public static String constructRequestUrl(HttpServletRequest request) { StringBuilder url = new StringBuilder(); url.append(constructRequestBaseUrl(request)); String urlPath = request.getRequestURI(); url.append(urlPath); return url.toString(); } private  HttpServletRequestUtils(); }
HttpServletRequestUtils { public static String constructRequestUrl(HttpServletRequest request) { StringBuilder url = new StringBuilder(); url.append(constructRequestBaseUrl(request)); String urlPath = request.getRequestURI(); url.append(urlPath); return url.toString(); } private  HttpServletRequestUtils(); static String extractClientIp(HttpServletRequest request); static String extractScheme(HttpServletRequest request); static String extractHost(HttpServletRequest request); static int extractServerPort(HttpServletRequest request); static String constructRequestBaseUrl(HttpServletRequest request); static String constructRequestUrl(HttpServletRequest request); static String constructRequestUrlWithParameters(HttpServletRequest request); static boolean isDefaultPort(String scheme, int port); }
HttpServletRequestUtils { public static String constructRequestUrl(HttpServletRequest request) { StringBuilder url = new StringBuilder(); url.append(constructRequestBaseUrl(request)); String urlPath = request.getRequestURI(); url.append(urlPath); return url.toString(); } private  HttpServletRequestUtils(); static String extractClientIp(HttpServletRequest request); static String extractScheme(HttpServletRequest request); static String extractHost(HttpServletRequest request); static int extractServerPort(HttpServletRequest request); static String constructRequestBaseUrl(HttpServletRequest request); static String constructRequestUrl(HttpServletRequest request); static String constructRequestUrlWithParameters(HttpServletRequest request); static boolean isDefaultPort(String scheme, int port);  }