Fix http URLs

See gh-22839
This commit is contained in:
Rob Winch
2019-04-23 16:35:28 -05:00
committed by Stephane Nicoll
parent b5fba14ab8
commit fde92793b5
36 changed files with 215 additions and 207 deletions

View File

@@ -211,7 +211,7 @@ public class CrossOriginTests {
CorsConfiguration config = getCorsConfiguration(chain, false);
assertThat(config).isNotNull();
assertThat(config.getAllowedMethods().toArray()).isEqualTo(new String[] {"GET"});
assertThat(config.getAllowedOrigins().toArray()).isEqualTo(new String[] {"http://www.foo.com/"});
assertThat(config.getAllowedOrigins().toArray()).isEqualTo(new String[] {"http://www.foo.example/"});
assertThat((boolean) config.getAllowCredentials()).isTrue();
}
@@ -224,7 +224,7 @@ public class CrossOriginTests {
CorsConfiguration config = getCorsConfiguration(chain, false);
assertThat(config).isNotNull();
assertThat(config.getAllowedMethods().toArray()).isEqualTo(new String[] {"GET"});
assertThat(config.getAllowedOrigins().toArray()).isEqualTo(new String[] {"http://www.foo.com/"});
assertThat(config.getAllowedOrigins().toArray()).isEqualTo(new String[] {"http://www.foo.example/"});
assertThat((boolean) config.getAllowCredentials()).isTrue();
}
@@ -418,7 +418,7 @@ public class CrossOriginTests {
@Controller
@ComposedCrossOrigin(origins = "http://www.foo.com/", allowCredentials = "true")
@ComposedCrossOrigin(origins = "http://www.foo.example/", allowCredentials = "true")
private static class ClassLevelMappingWithComposedAnnotation {
@RequestMapping(path = "/foo", method = RequestMethod.GET)
@@ -431,7 +431,7 @@ public class CrossOriginTests {
private static class MethodLevelMappingWithComposedAnnotation {
@RequestMapping(path = "/foo", method = RequestMethod.GET)
@ComposedCrossOrigin(origins = "http://www.foo.com/", allowCredentials = "true")
@ComposedCrossOrigin(origins = "http://www.foo.example/", allowCredentials = "true")
public void foo() {
}
}

View File

@@ -109,10 +109,10 @@ public class AppCacheManifestTransformerTests {
assertThat(content).as("not rewrite external resources")
.contains("//example.org/style.css")
.contains("http://example.org/image.png");
.contains("https://example.org/image.png");
assertThat(content).as("generate fingerprint")
.contains("# Hash: 4bf0338bcbeb0a5b3a4ec9ed8864107d");
.contains("# Hash: 65ebc023e50b2b731fcace2871f0dae3");
}
private Resource getResource(String filePath) {

View File

@@ -208,13 +208,13 @@ public class RedirectViewTests {
assertThat(rv.isRemoteHost("https://url.somewhere.com")).isFalse();
assertThat(rv.isRemoteHost("/path")).isFalse();
assertThat(rv.isRemoteHost("http://url.somewhereelse.com")).isFalse();
assertThat(rv.isRemoteHost("http://somewhereelse.example")).isFalse();
rv.setHosts(new String[] {"url.somewhere.com"});
assertThat(rv.isRemoteHost("https://url.somewhere.com")).isFalse();
assertThat(rv.isRemoteHost("/path")).isFalse();
assertThat(rv.isRemoteHost("http://url.somewhereelse.com")).isTrue();
assertThat(rv.isRemoteHost("http://somewhereelse.example")).isTrue();
}