This is an automated email from the ASF dual-hosted git repository. astefanutti pushed a commit to branch release-1.7.x in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit ac5281626e2f014c880fffabbc3e4b581047c9d2 Author: Antonin Stefanutti <[email protected]> AuthorDate: Thu Jan 6 17:59:40 2022 +0100 chore(maven): Default to standard HTTP and HTTPS port numbers --- pkg/util/maven/maven_proxies.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/util/maven/maven_proxies.go b/pkg/util/maven/maven_proxies.go index 4418ea5..abb8a91 100644 --- a/pkg/util/maven/maven_proxies.go +++ b/pkg/util/maven/maven_proxies.go @@ -58,6 +58,14 @@ func parseProxyFromEnvVar(proxyEnvVar string) (Proxy, error) { Host: u.Hostname(), Port: u.Port(), } + if proxy.Port == "" { + switch proxy.Protocol { + case "http": + proxy.Port = "80" + case "https": + proxy.Port = "443" + } + } if user := u.User; user != nil { proxy.Username = user.Username() if password, set := user.Password(); set {
