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

@@ -146,7 +146,7 @@ public abstract class HypermediaDocumentation {
* {
* "_links": {
* "self": {
* "href": "http://example.com/foo"
* "href": "https://example.com/foo"
* }
* }
* }
@@ -167,7 +167,7 @@ public abstract class HypermediaDocumentation {
* "links": [
* {
* "rel": "self",
* "href": "http://example.com/foo"
* "href": "https://example.com/foo"
* }
* ]
* }

View File

@@ -82,7 +82,7 @@ public class PrettyPrintingContentModifier implements ContentModifier {
public byte[] prettyPrint(byte[] original) throws Exception {
Transformer transformer = TransformerFactory.newInstance().newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount",
transformer.setOutputProperty("{https://xml.apache.org/xslt}indent-amount",
"4");
transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, "yes");
ByteArrayOutputStream transformed = new ByteArrayOutputStream();

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"
} ]
}