提交 cc1f75cd 编写于 作者: O OHTAKE Tomohiro

[FIXED JENKINS-11151] HTTPS default port is 443

上级 663897c2
......@@ -58,6 +58,9 @@ Upcoming changes</a>
<li class=rfe>
Added a way to show avatar images on user pages.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-7494">issue 7494</a>)
<li class=bug>
HTTPS on port 80 makes Jenkins infer his URI incorrectly
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-11151">issue 11151</a>)
</ul>
</div><!--=TRUNK-END=-->
......
......@@ -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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册