Skip to content

Commit 7af6c51

Browse files
Jason Wattlukeis
authored andcommitted
Preserve the protocol in grid when forwarding connections (#2556)
1 parent 887548c commit 7af6c51

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

java/server/src/org/openqa/grid/internal/BaseRemoteProxy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ public JsonObject getStatus() throws GridException {
483483
String url = getRemoteHost().toExternalForm() + "/wd/hub/status";
484484
BasicHttpRequest r = new BasicHttpRequest("GET", url);
485485
HttpClient client = getHttpClientFactory().getGridHttpClient(config.nodeStatusCheckTimeout, config.nodeStatusCheckTimeout);
486-
HttpHost host = new HttpHost(getRemoteHost().getHost(), getRemoteHost().getPort());
486+
HttpHost host = new HttpHost(getRemoteHost().getHost(), getRemoteHost().getPort(), getRemoteHost().getProtocol());
487487
HttpResponse response;
488488
String existingName = Thread.currentThread().getName();
489489
HttpEntity entity = null;

java/server/src/org/openqa/grid/internal/TestSession.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ private HttpResponse sendRequestToNode(HttpRequest proxyRequest) throws ClientPr
362362
IOException {
363363
HttpClient client = getClient();
364364
URL remoteURL = slot.getRemoteURL();
365-
HttpHost host = new HttpHost(remoteURL.getHost(), remoteURL.getPort());
365+
HttpHost host = new HttpHost(remoteURL.getHost(), remoteURL.getPort(), remoteURL.getProtocol());
366366

367367
return client.execute(host, proxyRequest);
368368
}

0 commit comments

Comments
 (0)