private boolean isRequestURLEqualsExitPageHost ( HttpServletRequest req , String logoutURLhost ) { boolean acceptURL = false ; try { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "about to attempt matching the logout exit url with the domain of the request." ) ; StringBuffer requestURLString = req . getRequestURL ( ) ; URL requestURL = new URL ( new String ( requestURLString ) ) ; String requestURLhost = requestURL . getHost ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , " host of the request url is: " + requestURLhost + " and the host of the logout URL is: " + logoutURLhost ) ; if ( logoutURLhost != null && requestURLhost != null && logoutURLhost . equalsIgnoreCase ( requestURLhost ) ) { acceptURL = true ; } } catch ( MalformedURLException e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "caught Exception trying to form request URL object: " + e . getMessage ( ) ) ; } } return acceptURL ; }
Attempt to match the request URL s host with the URL for the exitPage this might be the case of a proxy URL that is used in the request .