You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by as...@apache.org on 2022/01/12 13:53:49 UTC
[camel-k] 03/31: chore(maven): Default to standard HTTP and HTTPS port numbers
This is an automated email from the ASF dual-hosted git repository.
astefanutti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 05a2737d66879c749b6f06a594d9bbae63c0773a
Author: Antonin Stefanutti <an...@stefanutti.fr>
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 {