提交 0e3c2456 编写于 作者: K Kohsuke Kawaguchi

report request headers

上级 0eb59645
......@@ -1332,4 +1332,13 @@ public class Functions {
public static void restoreCurrentDescriptorByNameUrl(String old) {
Stapler.getCurrentRequest().setAttribute("currentDescriptorByNameUrl", old);
}
public static List<String> getRequestHeaders(String name) {
List<String> r = new ArrayList<String>();
Enumeration e = Stapler.getCurrentRequest().getHeaders(name);
while (e.hasMoreElements()) {
r.add(e.nextElement().toString());
}
return r;
}
}
......@@ -68,6 +68,24 @@ THE SOFTWARE.
<td>${auth}</td>
</tr>
</table>
<h2>Request Headers</h2>
<table>
<j:forEach var="n" items="${request.getHeaderNames()}">
<j:set var="values" value="${h.getRequestHeaders(n)}"/>
<tr>
<td rowspan="${values.size()}">${n}</td>
<td>
${values[0]}
</td>
</tr>
<j:forEach var="v" items="${values.subList(1,values.size())}">
<tr>
<td>${v}</td>
</tr>
</j:forEach>
</j:forEach>
</table>
</l:main-panel>
</l:layout>
</j:jelly>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册