From 1347724cdf5999a3bb4480d05dbbf89c901a3519 Mon Sep 17 00:00:00 2001 From: Spring Operator Date: Tue, 26 Mar 2019 03:45:19 -0500 Subject: [PATCH 1/2] 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://compose.docker.io/ (UnknownHostException) with 1 occurrences migrated to: https://compose.docker.io/ ([https](https://compose.docker.io/) 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). ## 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://PROD-SVC with 2 occurrences * http://Url/ with 1 occurrences * http://bad_hostname with 1 occurrences * http://bar with 1 occurrences * http://bar/ with 1 occurrences * http://foo with 19 occurrences * http://foo/ with 4 occurrences * http://foo/?name=%7bcookie with 1 occurrences * http://foo:7777/ with 1 occurrences * http://good-name with 2 occurrences * http://listener with 6 occurrences * http://localhost with 11 occurrences * http://localhost:8080/ with 1 occurrences * http://localhost:8081/ with 1 occurrences --- .editorconfig | 2 +- .github/CONTRIBUTING.md | 4 ++-- README.adoc | 14 +++++++------- asciidoctor.css | 2 +- docs/src/main/asciidoc/spring-cloud-openfeign.adoc | 6 +++--- .../openfeign/ribbon/FeignRibbonClientTests.java | 8 ++++---- .../RibbonResponseStatusCodeExceptionTest.java | 2 +- .../valid/FeignClientValidationTests.java | 4 ++-- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.editorconfig b/.editorconfig index 0679d88a..e65ee453 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,4 +1,4 @@ -# EditorConfig is awesome: http://EditorConfig.org +# EditorConfig is awesome: https://EditorConfig.org # top-most EditorConfig file root = true diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 8560ad2a..eb9a16ae 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -28,7 +28,7 @@ added after the original pull request but before a merge. you can import formatter settings using the `eclipse-code-formatter.xml` file from the [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 - [Eclipse Code Formatter Plugin](http://plugins.jetbrains.com/plugin/6546) to import the same file. + [Eclipse Code Formatter Plugin](https://plugins.jetbrains.com/plugin/6546) to import the same file. * Make sure all new `.java` files to have a simple Javadoc class comment with at least an `@author` tag identifying you, and preferably at least a paragraph on what the class is for. @@ -40,6 +40,6 @@ added after the original pull request but before a merge. * A few unit tests would help a lot as well -- someone has to do it. * If no-one else is using your branch, please rebase it against the current master (or other target branch in the main project). -* When writing a commit message please follow [these conventions](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html), +* When writing a commit message please follow [these conventions](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html), if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit message (where XXXX is the issue number). diff --git a/README.adoc b/README.adoc index 6aeda28d..0c6d1d35 100644 --- a/README.adoc +++ b/README.adoc @@ -51,7 +51,7 @@ credentials and you already have those. The projects that require middleware generally include a `docker-compose.yml`, so consider using -http://compose.docker.io/[Docker Compose] to run the middeware servers +https://compose.docker.io/[Docker Compose] to run the middeware servers in Docker containers. See the README in the https://github.com/spring-cloud-samples/scripts[scripts demo repository] for specific instructions about the common cases of mongo, @@ -73,13 +73,13 @@ a modified file in the correct place. Just commit it and push the change. === Working with the code If you don't have an IDE preference we would recommend that you use -http://www.springsource.com/developer/sts[Spring Tools Suite] or -http://eclipse.org[Eclipse] when working with the code. We use the -http://eclipse.org/m2e/[m2eclipse] eclipse plugin for maven support. Other IDEs and tools +https://www.springsource.com/developer/sts[Spring Tools Suite] or +https://eclipse.org[Eclipse] when working with the code. We use the +https://eclipse.org/m2e/[m2eclipse] eclipse plugin for maven support. Other IDEs and tools should also work without issue as long as they use Maven 3.3.3 or better. ==== Importing into eclipse with m2eclipse -We recommend the http://eclipse.org/m2e/[m2eclipse] eclipse plugin when working with +We recommend the https://eclipse.org/m2e/[m2eclipse] eclipse plugin when working with eclipse. If you don't already have m2eclipse installed it is available from the "eclipse marketplace". @@ -136,7 +136,7 @@ added after the original pull request but before a merge. `eclipse-code-formatter.xml` file from the https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-dependencies-parent/eclipse-code-formatter.xml[Spring Cloud Build] project. If using IntelliJ, you can use the - http://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter + https://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter Plugin] to import the same file. * Make sure all new `.java` files to have a simple Javadoc class comment with at least an `@author` tag identifying you, and preferably at least a paragraph on what the class is @@ -149,6 +149,6 @@ added after the original pull request but before a merge. * A few unit tests would help a lot as well -- someone has to do it. * If no-one else is using your branch, please rebase it against the current master (or other target branch in the main project). -* When writing a commit message please follow http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions], +* When writing a commit message please follow https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions], if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit message (where XXXX is the issue number). \ No newline at end of file diff --git a/asciidoctor.css b/asciidoctor.css index ee4f1d81..f592f50a 100644 --- a/asciidoctor.css +++ b/asciidoctor.css @@ -1,4 +1,4 @@ -/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */ +/* Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */ /* Remove the comments around the @import statement below when using this as a custom stylesheet */ /*@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";*/ article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { diff --git a/docs/src/main/asciidoc/spring-cloud-openfeign.adoc b/docs/src/main/asciidoc/spring-cloud-openfeign.adoc index 86aa25a8..b7b5c9fc 100644 --- a/docs/src/main/asciidoc/spring-cloud-openfeign.adoc +++ b/docs/src/main/asciidoc/spring-cloud-openfeign.adoc @@ -1,7 +1,7 @@ :github-tag: master :github-repo: spring-cloud/spring-cloud-openfeign -:github-raw: http://raw.github.com/{github-repo}/{github-tag} -:github-code: http://github.com/{github-repo}/tree/{github-tag} +:github-raw: https://raw.github.com/{github-repo}/{github-tag} +:github-code: https://github.com/{github-repo}/tree/{github-tag} :all: {asterisk}{asterisk} :nofooter: :branch: master @@ -21,7 +21,7 @@ https://github.com/Netflix/feign[Feign] is a declarative web service client. It === How to Include Feign To include Feign in your project use the starter with group `org.springframework.cloud` -and artifact id `spring-cloud-starter-openfeign`. See the http://projects.spring.io/spring-cloud/[Spring Cloud Project page] +and artifact id `spring-cloud-starter-openfeign`. See the https://projects.spring.io/spring-cloud/[Spring Cloud Project page] for details on setting up your build system with the current Spring Cloud Release Train. Example spring boot app diff --git a/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/ribbon/FeignRibbonClientTests.java b/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/ribbon/FeignRibbonClientTests.java index 46d08815..61dc037d 100644 --- a/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/ribbon/FeignRibbonClientTests.java +++ b/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/ribbon/FeignRibbonClientTests.java @@ -101,7 +101,7 @@ public class FeignRibbonClientTests { Request request = new RequestTemplate().method(GET).target("http://foo") .resolve(new HashMap<>()).request(); this.client.execute(request, new Options()); - RequestMatcher matcher = new RequestMatcher("http://foo.com:8000/"); + RequestMatcher matcher = new RequestMatcher("https://foo.com:8000/"); verify(this.delegate).execute(argThat(matcher), any(Options.class)); } @@ -110,16 +110,16 @@ public class FeignRibbonClientTests { Request request = new RequestTemplate().method(GET).target("http://foo/") .resolve(new HashMap<>()).request(); this.client.execute(request, new Options()); - RequestMatcher matcher = new RequestMatcher("http://foo.com:8000/"); + RequestMatcher matcher = new RequestMatcher("https://foo.com:8000/"); verify(this.delegate).execute(argThat(matcher), any(Options.class)); } @Test public void verifyCleanUrl() throws Exception { Request request = new RequestTemplate().method(GET) - .target("http://tp/abc/bcd.json").resolve(new HashMap<>()).request(); + .target("https://tp/abc/bcd.json").resolve(new HashMap<>()).request(); this.client.execute(request, new Options()); - RequestMatcher matcher = new RequestMatcher("http://foo.com:8000/abc/bcd.json"); + RequestMatcher matcher = new RequestMatcher("https://foo.com:8000/abc/bcd.json"); verify(this.delegate).execute(argThat(matcher), any(Options.class)); } diff --git a/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/ribbon/RibbonResponseStatusCodeExceptionTest.java b/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/ribbon/RibbonResponseStatusCodeExceptionTest.java index 599e4d88..f2d47fb7 100644 --- a/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/ribbon/RibbonResponseStatusCodeExceptionTest.java +++ b/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/ribbon/RibbonResponseStatusCodeExceptionTest.java @@ -48,7 +48,7 @@ public class RibbonResponseStatusCodeExceptionTest { List fooValues = new ArrayList(); fooValues.add("bar"); headers.put("foo", fooValues); - Request request = Request.create(GET, "http://service.com", + Request request = Request.create(GET, "https://service.com", new HashMap>(), new byte[] {}, Charset.defaultCharset()); byte[] body = "foo".getBytes(); diff --git a/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/valid/FeignClientValidationTests.java b/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/valid/FeignClientValidationTests.java index d614b97b..3e97b413 100644 --- a/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/valid/FeignClientValidationTests.java +++ b/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/valid/FeignClientValidationTests.java @@ -69,7 +69,7 @@ public class FeignClientValidationTests { @EnableFeignClients(clients = GoodUrlConfiguration.Client.class) protected static class GoodUrlConfiguration { - @FeignClient(name = "example", url = "http://example.com") + @FeignClient(name = "example", url = "https://example.com") interface Client { @RequestMapping(method = RequestMethod.GET, value = "/") @@ -85,7 +85,7 @@ public class FeignClientValidationTests { @EnableFeignClients(clients = PlaceholderUrlConfiguration.Client.class) protected static class PlaceholderUrlConfiguration { - @FeignClient(name = "example", url = "${feignClient.url:http://example.com}") + @FeignClient(name = "example", url = "${feignClient.url:https://example.com}") interface Client { @RequestMapping(method = RequestMethod.GET, value = "/") From 05893e57e72a5f97dc86f8161eddf202cd1209f1 Mon Sep 17 00:00:00 2001 From: Ryan Baxter Date: Thu, 28 Mar 2019 15:57:28 -0400 Subject: [PATCH 2/2] Fixing test failures --- .../cloud/openfeign/ribbon/FeignRibbonClientTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/ribbon/FeignRibbonClientTests.java b/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/ribbon/FeignRibbonClientTests.java index 61dc037d..ca776146 100644 --- a/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/ribbon/FeignRibbonClientTests.java +++ b/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/ribbon/FeignRibbonClientTests.java @@ -98,7 +98,7 @@ public class FeignRibbonClientTests { @Test public void remoteRequestIsSentAtRoot() throws Exception { - Request request = new RequestTemplate().method(GET).target("http://foo") + Request request = new RequestTemplate().method(GET).target("https://foo") .resolve(new HashMap<>()).request(); this.client.execute(request, new Options()); RequestMatcher matcher = new RequestMatcher("https://foo.com:8000/"); @@ -107,7 +107,7 @@ public class FeignRibbonClientTests { @Test public void remoteRequestIsSent() throws Exception { - Request request = new RequestTemplate().method(GET).target("http://foo/") + Request request = new RequestTemplate().method(GET).target("https://foo/") .resolve(new HashMap<>()).request(); this.client.execute(request, new Options()); RequestMatcher matcher = new RequestMatcher("https://foo.com:8000/");