提交 b1e7c1bf 编写于 作者: S Stephen Connolly

[FIXED JENKINS-37189] Only append `?uctest` to http/https update center URLs

- Also fixes to append `&uctest` if the update center URL already contains a query fragment
上级 584ecc0b
......@@ -1042,7 +1042,11 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas
* @throws IOException if a connection to the update center server can't be established.
*/
public void checkUpdateCenter(ConnectionCheckJob job, String updateCenterUrl) throws IOException {
testConnection(new URL(updateCenterUrl + "?uctest"));
if (updateCenterUrl.startsWith("http://") || updateCenterUrl.startsWith("https://")) {
testConnection(new URL(updateCenterUrl + (updateCenterUrl.indexOf('?') == -1 ? "?uctest" : "&uctest")));
} else {
testConnection(new URL(updateCenterUrl));
}
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册