提交 963621ac 编写于 作者: J jglick

[FIXED HUDSON-7100] X-Hudson header was not being sent after change of servlet mapping.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@33379 71c3de6d-444a-0410-be80-ed276b4c234a
上级 c4fe1e66
......@@ -23,7 +23,7 @@ THE SOFTWARE.
-->
<st:compress xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<j:if test="${request.servletPath=='/'}">
<j:if test="${request.servletPath=='/' || request.servletPath==''}">
<st:header name="X-Hudson" value="${servletContext.getAttribute('version')}" />
<j:if test="${app.tcpSlaveAgentListener!=null}">
<!-- advertize the CLI TCP port -->
......
......@@ -23,6 +23,7 @@
*/
package hudson.model;
import org.jvnet.hudson.test.Bug;
import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
import com.gargoylesoftware.htmlunit.html.HtmlAnchor;
import com.gargoylesoftware.htmlunit.html.HtmlForm;
......@@ -39,6 +40,11 @@ import static hudson.model.Messages.Hudson_ViewName;
*/
public class ViewTest extends HudsonTestCase {
@Bug(7100)
public void testXHudsonHeader() throws Exception {
assertNotNull(new WebClient().goTo("/").getWebResponse().getResponseHeaderValue("X-Hudson"));
}
/**
* Creating two views with the same name.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册