diff --git a/src/XrdCl/XrdClURL.cc b/src/XrdCl/XrdClURL.cc index 0acebff6191..4e48ec62256 100644 --- a/src/XrdCl/XrdClURL.cc +++ b/src/XrdCl/XrdClURL.cc @@ -90,6 +90,16 @@ namespace XrdCl current = url; } + //-------------------------------------------------------------------------- + // If the protocol is HTTP or HTTPS, change the default port number + //-------------------------------------------------------------------------- + if (pProtocol == "http") { + pPort = 80; + } + if (pProtocol == "https") { + pPort = 443; + } + //-------------------------------------------------------------------------- // Extract host info and path //--------------------------------------------------------------------------