SEC-1496: Added support for use of any non-standard URL schemes in DefaultRedirectStrategy.

This commit is contained in:
Luke Taylor
2010-06-18 03:33:06 +01:00
parent 48016969ee
commit ea8d37892c
3 changed files with 41 additions and 6 deletions

View File

@@ -0,0 +1,22 @@
package org.springframework.security.web.util;
import static org.junit.Assert.*;
import org.junit.Test;
/**
*
* @author Luke Taylor
*/
public class UrlUtilsTests {
@Test
public void absoluteUrlsAreMatchedAsAbsolute() throws Exception {
assertTrue(UrlUtils.isAbsoluteUrl("http://something/"));
assertTrue(UrlUtils.isAbsoluteUrl("HTTP://something/"));
assertTrue(UrlUtils.isAbsoluteUrl("https://something/"));
assertTrue(UrlUtils.isAbsoluteUrl("a://something/"));
assertTrue(UrlUtils.isAbsoluteUrl("zz+zz.zz-zz://something/"));
}
}