public static String getAbsoluteUrl ( SlingHttpServletRequest request , String url ) { if ( ! isExternalUrl ( url ) && url . startsWith ( "/" ) ) { String scheme = request . getScheme ( ) . toLowerCase ( ) ; url = scheme + "://" + getAuthority ( request ) + url ; } return url ; }
Makes a URL already built external ; the url should be built by the getUrl method .