diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java index 510a2493fa05..9ac127b0afda 100644 --- a/core/src/main/java/hudson/Functions.java +++ b/core/src/main/java/hudson/Functions.java @@ -2284,15 +2284,6 @@ public static void advertiseHeaders(HttpServletResponse rsp) { rsp.setHeader("X-Hudson","1.395"); rsp.setHeader("X-Jenkins", Jenkins.VERSION); rsp.setHeader("X-Jenkins-Session", Jenkins.SESSION_HASH); - - TcpSlaveAgentListener tal = j.tcpSlaveAgentListener; - if (tal != null) { // headers used only by deprecated Remoting-based CLI - int p = tal.getAdvertisedPort(); - rsp.setIntHeader("X-Hudson-CLI-Port", p); - rsp.setIntHeader("X-Jenkins-CLI-Port", p); - rsp.setIntHeader("X-Jenkins-CLI2-Port", p); - rsp.setHeader("X-Jenkins-CLI-Host", TcpSlaveAgentListener.CLI_HOST_NAME); - } } } diff --git a/test/src/test/java/hudson/cli/CLITest.java b/test/src/test/java/hudson/cli/CLITest.java index b39902c50378..1df171d10b80 100644 --- a/test/src/test/java/hudson/cli/CLITest.java +++ b/test/src/test/java/hudson/cli/CLITest.java @@ -176,7 +176,6 @@ public void redirectToEndpointShouldBeFollowed() throws Exception { WebResponse rsp = wc.goTo("cli-proxy/").getWebResponse(); assertEquals(rsp.getContentAsString(), HttpURLConnection.HTTP_MOVED_TEMP, rsp.getStatusCode()); assertNull(rsp.getContentAsString(), rsp.getResponseHeaderValue("X-Jenkins")); - assertNull(rsp.getContentAsString(), rsp.getResponseHeaderValue("X-Jenkins-CLI-Port")); for (String transport: Arrays.asList("-http", "-webSocket")) {