Skip to content

Commit fad29a3

Browse files
authored
Do not set content length to zero (SeleniumHQ#11417)
Fixes: SeleniumHQ#11342
1 parent 87b4de8 commit fad29a3

File tree

6 files changed

+0
-6
lines changed

6 files changed

+0
-6
lines changed

java/src/org/openqa/selenium/docker/v1_41/GetContainerLogs.java

-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public ContainerLogs apply(ContainerId id) {
5050

5151
HttpResponse res = client.execute(
5252
new HttpRequest(GET, requestUrl)
53-
.addHeader("Content-Length", "0")
5453
.addHeader("Content-Type", "text/plain"));
5554
if (res.getStatus() != HTTP_OK) {
5655
LOG.warning("Unable to inspect container " + id);

java/src/org/openqa/selenium/docker/v1_41/InspectContainer.java

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ public ContainerInfo apply(ContainerId id) {
5252

5353
HttpResponse res = client.execute(
5454
new HttpRequest(GET, String.format("/v%s/containers/%s/json", DOCKER_API_VERSION, id))
55-
.addHeader("Content-Length", "0")
5655
.addHeader("Content-Type", "text/plain"));
5756
if (res.getStatus() != HTTP_OK) {
5857
LOG.warning("Unable to inspect container " + id);

java/src/org/openqa/selenium/docker/v1_41/IsContainerPresent.java

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ public boolean apply(ContainerId id) {
3838

3939
HttpResponse res = client.execute(
4040
new HttpRequest(GET, String.format("/v%s/containers/%s/json", DOCKER_API_VERSION, id))
41-
.addHeader("Content-Length", "0")
4241
.addHeader("Content-Type", "text/plain"));
4342

4443
return res.isSuccessful();

java/src/org/openqa/selenium/docker/v1_41/ListImages.java

-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public Set<Image> apply(Reference reference) {
5858

5959
// https://docs.docker.com/engine/api/v1.41/#operation/ImageList
6060
HttpRequest req = new HttpRequest(GET, String.format("/v%s/images/json", DOCKER_API_VERSION))
61-
.addHeader("Content-Length", "0")
6261
.addHeader("Content-Type", JSON_UTF_8)
6362
.addQueryParameter("filters", JSON.toJson(filters));
6463

java/src/org/openqa/selenium/docker/v1_41/StartContainer.java

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public void apply(ContainerId id) {
3939
throwIfNecessary(
4040
client.execute(
4141
new HttpRequest(POST, String.format("/v%s/containers/%s/start", DOCKER_API_VERSION, id))
42-
.addHeader("Content-Length", "0")
4342
.addHeader("Content-Type", "text/plain")),
4443
"Unable to start container: %s",
4544
id);

java/src/org/openqa/selenium/docker/v1_41/StopContainer.java

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public void apply(ContainerId id, Duration timeout) {
4343

4444
String requestUrl = String.format("/v%s/containers/%s/stop", DOCKER_API_VERSION, id);
4545
HttpRequest request = new HttpRequest(POST, requestUrl)
46-
.addHeader("Content-Length", "0")
4746
.addHeader("Content-Type", "text/plain")
4847
.addQueryParameter("t", seconds);
4948

0 commit comments

Comments
 (0)