[FIXED JENKINS-11151] HTTPS default port is 443

This commit is contained in:
OHTAKE Tomohiro committed 2011-09-28 17:27:24 +09:00
1 parent 663897c2c3
commit cc1f75cdba
2 files changed
+4 -1

No files matched your search

+1 -1
View File
@@ -647,7 +647,7 @@ public class Functions {
StringBuilder buf = new StringBuilder();
buf.append(req.getScheme()).append("://");
buf.append(req.getServerName());
if(req.getLocalPort()!=80)
if(! (req.getScheme().equals("http") && req.getLocalPort()==80 || req.getScheme().equals("https") && req.getLocalPort()==443))
buf.append(':').append(req.getLocalPort());
buf.append(req.getContextPath()).append('/');
return buf.toString();