Skip to content

Commit a81c53a

Browse files
URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # Fixed URLs ## Fixed But Review Recommended These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended. * [ ] http://foo.com:8000/ (ConnectTimeoutException) with 2 occurrences migrated to: https://foo.com:8000/ ([https](https://foo.com:8000/) result ConnectTimeoutException). * [ ] http://foo.com:8000/abc/bcd.json (ConnectTimeoutException) with 1 occurrences migrated to: https://foo.com:8000/abc/bcd.json ([https](https://foo.com:8000/abc/bcd.json) result ConnectTimeoutException). * [ ] http://PROD-SVC (UnknownHostException) with 2 occurrences migrated to: https://PROD-SVC ([https](https://PROD-SVC) result UnknownHostException). * [ ] http://Url/ (UnknownHostException) with 1 occurrences migrated to: https://Url/ ([https](https://Url/) result UnknownHostException). * [ ] http://bad_hostname (UnknownHostException) with 1 occurrences migrated to: https://bad_hostname ([https](https://bad_hostname) result UnknownHostException). * [ ] http://bar (UnknownHostException) with 1 occurrences migrated to: https://bar ([https](https://bar) result UnknownHostException). * [ ] http://bar/ (UnknownHostException) with 1 occurrences migrated to: https://bar/ ([https](https://bar/) result UnknownHostException). * [ ] http://compose.docker.io/ (UnknownHostException) with 1 occurrences migrated to: https://compose.docker.io/ ([https](https://compose.docker.io/) result UnknownHostException). * [ ] http://foo (UnknownHostException) with 19 occurrences migrated to: https://foo ([https](https://foo) result UnknownHostException). * [ ] http://foo/ (UnknownHostException) with 4 occurrences migrated to: https://foo/ ([https](https://foo/) result UnknownHostException). * [ ] http://foo/?name=%7bcookie (UnknownHostException) with 1 occurrences migrated to: https://foo/?name=%7bcookie ([https](https://foo/?name=%7bcookie) result UnknownHostException). * [ ] http://foo:7777/ (UnknownHostException) with 1 occurrences migrated to: https://foo:7777/ ([https](https://foo:7777/) result UnknownHostException). * [ ] http://good-name (UnknownHostException) with 2 occurrences migrated to: https://good-name ([https](https://good-name) result UnknownHostException). * [ ] http://listener (UnknownHostException) with 6 occurrences migrated to: https://listener ([https](https://listener) result UnknownHostException). * [ ] http://tp/abc/bcd.json (UnknownHostException) with 1 occurrences migrated to: https://tp/abc/bcd.json ([https](https://tp/abc/bcd.json) result UnknownHostException). * [ ] http://www.puppycrawl.com/dtds/suppressions_1_1.dtd (404) with 1 occurrences migrated to: https://www.puppycrawl.com/dtds/suppressions_1_1.dtd ([https](https://www.puppycrawl.com/dtds/suppressions_1_1.dtd) result 404). ## Fixed Success These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended. * [ ] http://EditorConfig.org with 1 occurrences migrated to: https://EditorConfig.org ([https](https://EditorConfig.org) result 200). * [ ] http://asciidoctor.org with 1 occurrences migrated to: https://asciidoctor.org ([https](https://asciidoctor.org) result 200). * [ ] http://example.com with 2 occurrences migrated to: https://example.com ([https](https://example.com) result 200). * [ ] http://github.com/ with 1 occurrences migrated to: https://github.com/ ([https](https://github.com/) result 200). * [ ] http://projects.spring.io/spring-cloud/ with 1 occurrences migrated to: https://projects.spring.io/spring-cloud/ ([https](https://projects.spring.io/spring-cloud/) result 200). * [ ] http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html with 2 occurrences migrated to: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html ([https](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) result 200). * [ ] http://plugins.jetbrains.com/plugin/6546 with 2 occurrences migrated to: https://plugins.jetbrains.com/plugin/6546 ([https](https://plugins.jetbrains.com/plugin/6546) result 301). * [ ] http://raw.github.com/ with 1 occurrences migrated to: https://raw.github.com/ ([https](https://raw.github.com/) result 301). * [ ] http://service.com with 1 occurrences migrated to: https://service.com ([https](https://service.com) result 301). * [ ] http://eclipse.org with 1 occurrences migrated to: https://eclipse.org ([https](https://eclipse.org) result 302). * [ ] http://eclipse.org/m2e/ with 2 occurrences migrated to: https://eclipse.org/m2e/ ([https](https://eclipse.org/m2e/) result 302). * [ ] http://www.springsource.com/developer/sts with 1 occurrences migrated to: https://www.springsource.com/developer/sts ([https](https://www.springsource.com/developer/sts) result 302). # Ignored These URLs were intentionally ignored. * http://localhost with 11 occurrences * http://localhost:8080/ with 1 occurrences * http://localhost:8081/ with 1 occurrences
1 parent 43c5373 commit a81c53a

13 files changed

+61
-61
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# EditorConfig is awesome: http://EditorConfig.org
1+
# EditorConfig is awesome: https://EditorConfig.org
22

33
# top-most EditorConfig file
44
root = true

.github/CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ added after the original pull request but before a merge.
2828
you can import formatter settings using the
2929
`eclipse-code-formatter.xml` file from the
3030
[Spring Cloud Build](https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-dependencies-parent/eclipse-code-formatter.xml) project. If using IntelliJ, you can use the
31-
[Eclipse Code Formatter Plugin](http://plugins.jetbrains.com/plugin/6546) to import the same file.
31+
[Eclipse Code Formatter Plugin](https://plugins.jetbrains.com/plugin/6546) to import the same file.
3232
* Make sure all new `.java` files to have a simple Javadoc class comment with at least an
3333
`@author` tag identifying you, and preferably at least a paragraph on what the class is
3434
for.
@@ -40,6 +40,6 @@ added after the original pull request but before a merge.
4040
* A few unit tests would help a lot as well -- someone has to do it.
4141
* If no-one else is using your branch, please rebase it against the current master (or
4242
other target branch in the main project).
43-
* When writing a commit message please follow [these conventions](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html),
43+
* When writing a commit message please follow [these conventions](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html),
4444
if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit
4545
message (where XXXX is the issue number).

README.adoc

+8-8
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ credentials and you already have those.
5555

5656
The projects that require middleware generally include a
5757
`docker-compose.yml`, so consider using
58-
http://compose.docker.io/[Docker Compose] to run the middeware servers
58+
https://compose.docker.io/[Docker Compose] to run the middeware servers
5959
in Docker containers. See the README in the
6060
https://github.com/spring-cloud-samples/scripts[scripts demo
6161
repository] for specific instructions about the common cases of mongo,
@@ -77,13 +77,13 @@ a modified file in the correct place. Just commit it and push the change.
7777

7878
=== Working with the code
7979
If you don't have an IDE preference we would recommend that you use
80-
http://www.springsource.com/developer/sts[Spring Tools Suite] or
81-
http://eclipse.org[Eclipse] when working with the code. We use the
82-
http://eclipse.org/m2e/[m2eclipse] eclipse plugin for maven support. Other IDEs and tools
80+
https://www.springsource.com/developer/sts[Spring Tools Suite] or
81+
https://eclipse.org[Eclipse] when working with the code. We use the
82+
https://eclipse.org/m2e/[m2eclipse] eclipse plugin for maven support. Other IDEs and tools
8383
should also work without issue as long as they use Maven 3.3.3 or better.
8484

8585
==== Importing into eclipse with m2eclipse
86-
We recommend the http://eclipse.org/m2e/[m2eclipse] eclipse plugin when working with
86+
We recommend the https://eclipse.org/m2e/[m2eclipse] eclipse plugin when working with
8787
eclipse. If you don't already have m2eclipse installed it is available from the "eclipse
8888
marketplace".
8989

@@ -142,7 +142,7 @@ added after the original pull request but before a merge.
142142
`eclipse-code-formatter.xml` file from the
143143
https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-dependencies-parent/eclipse-code-formatter.xml[Spring
144144
Cloud Build] project. If using IntelliJ, you can use the
145-
http://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter
145+
https://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter
146146
Plugin] to import the same file.
147147
* Make sure all new `.java` files to have a simple Javadoc class comment with at least an
148148
`@author` tag identifying you, and preferably at least a paragraph on what the class is
@@ -155,7 +155,7 @@ added after the original pull request but before a merge.
155155
* A few unit tests would help a lot as well -- someone has to do it.
156156
* If no-one else is using your branch, please rebase it against the current master (or
157157
other target branch in the main project).
158-
* When writing a commit message please follow http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions],
158+
* When writing a commit message please follow https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions],
159159
if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit
160160
message (where XXXX is the issue number).
161161

@@ -226,7 +226,7 @@ If you need to suppress some rules (e.g. line length needs to be longer), then i
226226
<?xml version="1.0"?>
227227
<!DOCTYPE suppressions PUBLIC
228228
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
229-
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
229+
"https://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
230230
<suppressions>
231231
<suppress files=".*ConfigServerApplication\.java" checks="HideUtilityClassConstructor"/>
232232
<suppress files=".*ConfigClientWatch\.java" checks="LineLengthCheck"/>

asciidoctor.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */
1+
/* Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
22
/* Remove the comments around the @import statement below when using this as a custom stylesheet */
33
/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic|Noto+Serif:400,400italic,700,700italic|Droid+Sans+Mono:400";*/
44
article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary {

docs/src/main/asciidoc/spring-cloud-openfeign.adoc

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
:github-tag: master
22
:github-repo: spring-cloud/spring-cloud-openfeign
3-
:github-raw: http://raw.github.com/{github-repo}/{github-tag}
4-
:github-code: http://github.com/{github-repo}/tree/{github-tag}
3+
:github-raw: https://raw.github.com/{github-repo}/{github-tag}
4+
:github-code: https://github.com/{github-repo}/tree/{github-tag}
55
:all: {asterisk}{asterisk}
66
:nofooter:
77
:branch: master
@@ -21,7 +21,7 @@ https://github.com/Netflix/feign[Feign] is a declarative web service client. It
2121
=== How to Include Feign
2222

2323
To include Feign in your project use the starter with group `org.springframework.cloud`
24-
and artifact id `spring-cloud-starter-openfeign`. See the http://projects.spring.io/spring-cloud/[Spring Cloud Project page]
24+
and artifact id `spring-cloud-starter-openfeign`. See the https://projects.spring.io/spring-cloud/[Spring Cloud Project page]
2525
for details on setting up your build system with the current Spring Cloud Release Train.
2626

2727
Example spring boot app
@@ -257,14 +257,14 @@ class FooController {
257257
.decoder(decoder)
258258
.contract(contract)
259259
.requestInterceptor(new BasicAuthRequestInterceptor("user", "user"))
260-
.target(FooClient.class, "http://PROD-SVC");
260+
.target(FooClient.class, "https://PROD-SVC");
261261
262262
this.adminClient = Feign.builder().client(client)
263263
.encoder(encoder)
264264
.decoder(decoder)
265265
.contract(contract)
266266
.requestInterceptor(new BasicAuthRequestInterceptor("admin", "admin"))
267-
.target(FooClient.class, "http://PROD-SVC");
267+
.target(FooClient.class, "https://PROD-SVC");
268268
}
269269
}
270270
----

spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/FeignClientBuilderTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public void forType_allFieldsSetOnBuilder() {
136136
assertFactoryBeanField(builder, "name", "TestClient");
137137

138138
// and:
139-
assertFactoryBeanField(builder, "url", "http://Url/");
139+
assertFactoryBeanField(builder, "url", "https://Url/");
140140
assertFactoryBeanField(builder, "path", "/Path");
141141
assertFactoryBeanField(builder, "decode404", true);
142142
assertFactoryBeanField(builder, "fallback", Object.class);

spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/FeignClientOverrideDefaultsTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,15 @@ public void addRequestInterceptor() {
141141
.isEqualTo(2);
142142
}
143143

144-
@FeignClient(name = "foo", url = "http://foo", configuration = FooConfiguration.class)
144+
@FeignClient(name = "foo", url = "https://foo", configuration = FooConfiguration.class)
145145
interface FooClient {
146146

147147
@RequestLine("GET /")
148148
String get();
149149

150150
}
151151

152-
@FeignClient(name = "bar", url = "http://bar", configuration = BarConfiguration.class)
152+
@FeignClient(name = "bar", url = "https://bar", configuration = BarConfiguration.class)
153153
interface BarClient {
154154

155155
@RequestMapping(value = "/", method = RequestMethod.GET)

spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/FeignClientsRegistrarTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class FeignClientsRegistrarTests {
3737

3838
@Test(expected = IllegalStateException.class)
3939
public void badNameHttpPrefix() {
40-
testGetName("http://bad_hostname");
40+
testGetName("https://bad_hostname");
4141
}
4242

4343
@Test(expected = IllegalStateException.class)
@@ -63,8 +63,8 @@ public void goodName() {
6363

6464
@Test
6565
public void goodNameHttpPrefix() {
66-
String name = testGetName("http://good-name");
67-
assertThat(name).as("name was wrong").isEqualTo("http://good-name");
66+
String name = testGetName("https://good-name");
67+
assertThat(name).as("name was wrong").isEqualTo("https://good-name");
6868
}
6969

7070
@Test

spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/ribbon/FeignLoadBalancerTests.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public void testUriInsecure() throws Exception {
9696

9797
this.feignLoadBalancer = new FeignLoadBalancer(this.lb, this.config,
9898
this.inspector);
99-
Request request = new RequestTemplate().method(GET).target("http://foo/")
99+
Request request = new RequestTemplate().method(GET).target("https://foo/")
100100
.resolve(new HashMap<>()).request();
101101
RibbonRequest ribbonRequest = new RibbonRequest(this.delegate, request,
102102
new URI(request.url()));
@@ -108,7 +108,7 @@ public void testUriInsecure() throws Exception {
108108

109109
RibbonResponse resp = this.feignLoadBalancer.execute(ribbonRequest, null);
110110

111-
assertThat(resp.getRequestedURI()).isEqualTo(new URI("http://foo"));
111+
assertThat(resp.getRequestedURI()).isEqualTo(new URI("https://foo"));
112112
}
113113

114114
@Test
@@ -118,7 +118,7 @@ public void testSecureUriFromClientConfig() throws Exception {
118118
this.inspector);
119119
Server server = new Server("foo", 7777);
120120
URI uri = this.feignLoadBalancer.reconstructURIWithServer(server,
121-
new URI("http://foo/"));
121+
new URI("https://foo/"));
122122
assertThat(uri).isEqualTo(new URI("https://foo:7777/"));
123123
}
124124

@@ -140,8 +140,8 @@ public Map<String, String> getMetadata(Server server) {
140140
});
141141
Server server = new Server("foo", 7777);
142142
URI uri = this.feignLoadBalancer.reconstructURIWithServer(server,
143-
new URI("http://foo/"));
144-
assertThat(uri).isEqualTo(new URI("http://foo:7777/"));
143+
new URI("https://foo/"));
144+
assertThat(uri).isEqualTo(new URI("https://foo:7777/"));
145145
}
146146

147147
@Test
@@ -152,13 +152,13 @@ public void testSecureUriFromClientConfigOverride() throws Exception {
152152
when(server.getPort()).thenReturn(443);
153153
when(server.getHost()).thenReturn("foo");
154154
URI uri = this.feignLoadBalancer.reconstructURIWithServer(server,
155-
new URI("http://bar/"));
155+
new URI("https://bar/"));
156156
assertThat(uri).isEqualTo(new URI("https://foo:443/"));
157157
}
158158

159159
@Test
160160
public void testRibbonRequestURLEncode() throws Exception {
161-
String url = "http://foo/?name=%7bcookie"; // name={cookie
161+
String url = "https://foo/?name=%7bcookie"; // name={cookie
162162
Request request = Request.create(GET, url, new HashMap<>(), null, null);
163163

164164
assertThat(request.url()).isEqualTo(url);

spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/ribbon/FeignRibbonClientTests.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -98,28 +98,28 @@ public void init() {
9898

9999
@Test
100100
public void remoteRequestIsSentAtRoot() throws Exception {
101-
Request request = new RequestTemplate().method(GET).target("http://foo")
101+
Request request = new RequestTemplate().method(GET).target("https://foo")
102102
.resolve(new HashMap<>()).request();
103103
this.client.execute(request, new Options());
104-
RequestMatcher matcher = new RequestMatcher("http://foo.com:8000/");
104+
RequestMatcher matcher = new RequestMatcher("https://foo.com:8000/");
105105
verify(this.delegate).execute(argThat(matcher), any(Options.class));
106106
}
107107

108108
@Test
109109
public void remoteRequestIsSent() throws Exception {
110-
Request request = new RequestTemplate().method(GET).target("http://foo/")
110+
Request request = new RequestTemplate().method(GET).target("https://foo/")
111111
.resolve(new HashMap<>()).request();
112112
this.client.execute(request, new Options());
113-
RequestMatcher matcher = new RequestMatcher("http://foo.com:8000/");
113+
RequestMatcher matcher = new RequestMatcher("https://foo.com:8000/");
114114
verify(this.delegate).execute(argThat(matcher), any(Options.class));
115115
}
116116

117117
@Test
118118
public void verifyCleanUrl() throws Exception {
119119
Request request = new RequestTemplate().method(GET)
120-
.target("http://tp/abc/bcd.json").resolve(new HashMap<>()).request();
120+
.target("https://tp/abc/bcd.json").resolve(new HashMap<>()).request();
121121
this.client.execute(request, new Options());
122-
RequestMatcher matcher = new RequestMatcher("http://foo.com:8000/abc/bcd.json");
122+
RequestMatcher matcher = new RequestMatcher("https://foo.com:8000/abc/bcd.json");
123123
verify(this.delegate).execute(argThat(matcher), any(Options.class));
124124
}
125125

0 commit comments

Comments
 (0)