提交 ad099f05 编写于 作者: J Jesse Glick

Use X-Jenkins-CLI-Host where defined.

上级 d7023f9a
......@@ -86,7 +86,9 @@ public class Security218BlackBoxTest {
public void run() {
try {
Socket proxy = proxySocket.accept();
Socket real = new Socket(url.getHost(), ((HttpURLConnection) url.openConnection()).getHeaderFieldInt("X-Jenkins-CLI-Port", -1));
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
String host = conn.getHeaderField("X-Jenkins-CLI-Host");
Socket real = new Socket(host == null ? url.getHost() : host, conn.getHeaderFieldInt("X-Jenkins-CLI-Port", -1));
final InputStream realIS = real.getInputStream();
final OutputStream realOS = real.getOutputStream();
final InputStream proxyIS = proxy.getInputStream();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册