Use HTTPS for external links where possible

See gh-609
This commit is contained in:
Spring Operator
2019-03-26 04:42:31 -05:00
committed by Andy Wilkinson
parent 4fdb1f5361
commit f2e60ea347
25 changed files with 52 additions and 52 deletions

View File

@@ -68,23 +68,23 @@ public class LinkExtractorsPayloadTests {
public void singleLink() throws IOException {
Map<String, List<Link>> links = this.linkExtractor
.extractLinks(createResponse("single-link"));
assertLinks(Arrays.asList(new Link("alpha", "http://alpha.example.com")), links);
assertLinks(Arrays.asList(new Link("alpha", "https://alpha.example.com")), links);
}
@Test
public void multipleLinksWithDifferentRels() throws IOException {
Map<String, List<Link>> links = this.linkExtractor
.extractLinks(createResponse("multiple-links-different-rels"));
assertLinks(Arrays.asList(new Link("alpha", "http://alpha.example.com"),
new Link("bravo", "http://bravo.example.com")), links);
assertLinks(Arrays.asList(new Link("alpha", "https://alpha.example.com"),
new Link("bravo", "https://bravo.example.com")), links);
}
@Test
public void multipleLinksWithSameRels() throws IOException {
Map<String, List<Link>> links = this.linkExtractor
.extractLinks(createResponse("multiple-links-same-rels"));
assertLinks(Arrays.asList(new Link("alpha", "http://alpha.example.com/one"),
new Link("alpha", "http://alpha.example.com/two")), links);
assertLinks(Arrays.asList(new Link("alpha", "https://alpha.example.com/one"),
new Link("alpha", "https://alpha.example.com/two")), links);
}
@Test

View File

@@ -1,7 +1,7 @@
{
"_links": {
"alpha": "http://alpha.example.com",
"bravo": "http://bravo.example.com"
"alpha": "https://alpha.example.com",
"bravo": "https://bravo.example.com"
},
"_embedded": "embedded-test",
"beta": "beta-value",

View File

@@ -1,7 +1,7 @@
{
"_links": {
"alpha": "http://alpha.example.com",
"bravo": "http://bravo.example.com"
"alpha": "https://alpha.example.com",
"bravo": "https://bravo.example.com"
},
"beta": "beta-value",
"charlie": "charlie-value"

View File

@@ -1,9 +1,9 @@
{
"links": [ {
"rel": "alpha",
"href": "http://alpha.example.com"
"href": "https://alpha.example.com"
}, {
"rel": "bravo",
"href": "http://bravo.example.com"
"href": "https://bravo.example.com"
} ]
}

View File

@@ -1,9 +1,9 @@
{
"links": [ {
"rel": "alpha",
"href": "http://alpha.example.com/one"
"href": "https://alpha.example.com/one"
}, {
"rel": "alpha",
"href": "http://alpha.example.com/two"
"href": "https://alpha.example.com/two"
} ]
}

View File

@@ -1,6 +1,6 @@
{
"links": [ {
"rel": "alpha",
"href": "http://alpha.example.com"
"href": "https://alpha.example.com"
} ]
}

View File

@@ -1,9 +1,9 @@
{
"links": {
"alpha": [{
"href": "http://alpha.example.com/one"
"href": "https://alpha.example.com/one"
}, {
"href": "http://alpha.example.com/two"
"href": "https://alpha.example.com/two"
}]
}
}

View File

@@ -1,10 +1,10 @@
{
"_links": {
"alpha": {
"href": "http://alpha.example.com"
"href": "https://alpha.example.com"
},
"bravo": {
"href": "http://bravo.example.com"
"href": "https://bravo.example.com"
}
}
}

View File

@@ -1,9 +1,9 @@
{
"_links": {
"alpha": [{
"href": "http://alpha.example.com/one"
"href": "https://alpha.example.com/one"
}, {
"href": "http://alpha.example.com/two"
"href": "https://alpha.example.com/two"
}]
}
}

View File

@@ -1,7 +1,7 @@
{
"_links": {
"alpha": {
"href": "http://alpha.example.com"
"href": "https://alpha.example.com"
}
}
}

View File

@@ -1,9 +1,9 @@
{
"_links": [ {
"rel": "alpha",
"href": "http://alpha.example.com/one"
"href": "https://alpha.example.com/one"
}, {
"rel": "alpha",
"href": "http://alpha.example.com/two"
"href": "https://alpha.example.com/two"
} ]
}