Merge branch '6.1.x'
This commit is contained in:
@@ -13,7 +13,7 @@ dependencies {
|
|||||||
api(platform("io.netty:netty5-bom:5.0.0.Alpha5"))
|
api(platform("io.netty:netty5-bom:5.0.0.Alpha5"))
|
||||||
api(platform("io.projectreactor:reactor-bom:2024.0.0-M6"))
|
api(platform("io.projectreactor:reactor-bom:2024.0.0-M6"))
|
||||||
api(platform("io.rsocket:rsocket-bom:1.1.3"))
|
api(platform("io.rsocket:rsocket-bom:1.1.3"))
|
||||||
api(platform("org.apache.groovy:groovy-bom:4.0.22"))
|
api(platform("org.apache.groovy:groovy-bom:4.0.23"))
|
||||||
api(platform("org.apache.logging.log4j:log4j-bom:2.21.1"))
|
api(platform("org.apache.logging.log4j:log4j-bom:2.21.1"))
|
||||||
api(platform("org.assertj:assertj-bom:3.26.3"))
|
api(platform("org.assertj:assertj-bom:3.26.3"))
|
||||||
api(platform("org.eclipse.jetty:jetty-bom:12.0.13"))
|
api(platform("org.eclipse.jetty:jetty-bom:12.0.13"))
|
||||||
|
|||||||
@@ -379,8 +379,8 @@ class ResourceTests {
|
|||||||
@Test
|
@Test
|
||||||
void unusualRelativeResourcesAreEqual() throws Exception {
|
void unusualRelativeResourcesAreEqual() throws Exception {
|
||||||
Resource resource = new UrlResource("file:dir/");
|
Resource resource = new UrlResource("file:dir/");
|
||||||
Resource relative = resource.createRelative("http://spring.io");
|
Resource relative = resource.createRelative("https://spring.io");
|
||||||
assertThat(relative).isEqualTo(new UrlResource("file:dir/http://spring.io"));
|
assertThat(relative).isEqualTo(new UrlResource("file:dir/https://spring.io"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -421,14 +421,14 @@ class ResourceTests {
|
|||||||
@Test
|
@Test
|
||||||
void useUserInfoToSetBasicAuth() throws Exception {
|
void useUserInfoToSetBasicAuth() throws Exception {
|
||||||
startServer();
|
startServer();
|
||||||
UrlResource resource = new UrlResource("http://alice:secret@localhost:"
|
UrlResource resource = new UrlResource(
|
||||||
+ this.server.getPort() + "/resource");
|
"http://alice:secret@localhost:" + this.server.getPort() + "/resource");
|
||||||
assertThat(resource.getInputStream()).hasContent("Spring");
|
assertThat(resource.getInputStream()).hasContent("Spring");
|
||||||
RecordedRequest request = this.server.takeRequest();
|
RecordedRequest request = this.server.takeRequest();
|
||||||
String authorization = request.getHeader("Authorization");
|
String authorization = request.getHeader("Authorization");
|
||||||
assertThat(authorization).isNotNull().startsWith("Basic ");
|
assertThat(authorization).isNotNull().startsWith("Basic ");
|
||||||
assertThat(new String(Base64.getDecoder().decode(
|
assertThat(new String(Base64.getDecoder().decode(authorization.substring(6)),
|
||||||
authorization.substring(6)), StandardCharsets.ISO_8859_1)).isEqualTo("alice:secret");
|
StandardCharsets.ISO_8859_1)).isEqualTo("alice:secret");
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterEach
|
@AfterEach
|
||||||
|
|||||||
Reference in New Issue
Block a user