private static String convertToAbsoluteUrlIfNeeded ( String conduitName , String lastURL , String newURL , Message message ) throws IOException { if ( newURL != null && ! newURL . startsWith ( "http" ) ) { if ( MessageUtils . isTrue ( message . getContextualProperty ( AUTO_REDIRECT_ALLOW_REL_URI ) ) ) { return URI . create ( lastURL ) . resolve ( newURL ) . toString ( ) ; } else { String msg = "Relative Redirect detected on Conduit '" + conduitName + "' on '" + newURL + "'" ; LOG . log ( Level . INFO , msg ) ; throw new IOException ( msg ) ; } } else { return newURL ; } }
Relative Location values are also supported