Skip to content

Commit 8bd0366

Browse files
author
Alexander Garagatyi
committed
IDEX-3437: workaround bug of access to docker API over http
Cause of the bug is Golang libraby. See moby/moby#12845
1 parent 475527b commit 8bd0366

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection

plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/connection/TcpConnection.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ protected DockerResponse request(String method, String path, String query, List<
6262
((HttpsURLConnection)connection).setSSLSocketFactory(certificates.getSslContext().getSocketFactory());
6363
}
6464
connection.setRequestMethod(method);
65+
// needed to fix bug https://github.com/docker/docker/issues/12845
66+
connection.setRequestProperty("Connection", "close");
6567
for (Pair<String, ?> header : headers) {
6668
connection.setRequestProperty(header.first, String.valueOf(header.second));
6769
}

0 commit comments

Comments
 (0)