### CI Link

https://gradle-enterprise.elastic.co/s/4vs5o45pilg66/tests/:modules:repository-gcs:internalClusterTest/org.elasticsearch.repositories.gcs.GcsProxyIntegrationTests/testContainerCreationAndDeletion

### Repro line

`./gradlew ':modules:repository-gcs:internalClusterTest' --tests "org.elasticsearch.repositories.gcs.GcsProxyIntegrationTests.testContainerCreationAndDeletion" -Dtests.seed=58DD800E92CBFB3A -Dtests.locale=fi-FI -Dtests.timezone=Asia/Pyongyang -Druntime.java=17`

### Does it reproduce?

No

### Applicable branches

main

### Failure history

https://gradle-enterprise.elastic.co/scans/tests?search.timeZoneId=Europe/Berlin&tests.container=org.elasticsearch.repositories.gcs.GcsProxyIntegrationTests&tests.test=testContainerCreationAndDeletion#

### Failure excerpt

```
Caused by: java.net.SocketException: Unexpected end of file from server	
	at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:903) ~[?:?]	
	at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:726) ~[?:?]	
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1688) ~[?:?]	
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589) ~[?:?]	
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:529) ~[?:?]	
	at com.google.api.client.http.javanet.NetHttpResponse.<init>(NetHttpResponse.java:36) ~[google-http-client-1.42.3.jar:1.42.3]	
	at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:152) ~[google-http-client-1.42.3.jar:1.42.3]	
	at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:84) ~[google-http-client-1.42.3.jar:1.42.3]	
	at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1012) ~[google-http-client-1.42.3.jar:1.42.3]	
	at com.google.api.client.googleapis.batch.BatchRequest.execute(BatchRequest.java:257) ~[google-api-client-2.1.1.jar:2.1.1]	
	at com.google.cloud.storage.spi.v1.HttpStorageRpc$DefaultRpcBatch.submit(HttpStorageRpc.java:259) ~[google-cloud-storage-2.13.1.jar:2.13.1]	
	at com.google.cloud.storage.StorageBatch.submit(StorageBatch.java:149) ~[google-cloud-storage-2.13.1.jar:2.13.1]	
	at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobStore.lambda$deleteBlobsIgnoringIfNotExists$10(GoogleCloudStorageBlobStore.java:570) ~[main/:?]	
	at org.elasticsearch.repositories.gcs.SocketAccess.lambda$doPrivilegedVoidIOException$0(SocketAccess.java:43) ~[main/:?]	
	at java.security.AccessController.doPrivileged(AccessController.java:569) ~[?:?]	
	at org.elasticsearch.repositories.gcs.SocketAccess.doPrivilegedVoidIOException(SocketAccess.java:42) ~[main/:?]	
	at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobStore.deleteBlobsIgnoringIfNotExists(GoogleCloudStorageBlobStore.java:539) ~[main/:?]	
	at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobStore.lambda$deleteDirectory$9(GoogleCloudStorageBlobStore.java:496) ~[main/:?]	
	at java.security.AccessController.doPrivileged(AccessController.java:569) ~[?:?]	
	at org.elasticsearch.repositories.gcs.SocketAccess.doPrivilegedIOException(SocketAccess.java:33) ~[main/:?]	
	at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobStore.deleteDirectory(GoogleCloudStorageBlobStore.java:489) ~[main/:?]	
	at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobContainer.delete(GoogleCloudStorageBlobContainer.java:98) ~[main/:?]	
	at org.elasticsearch.repositories.blobstore.BlobStoreRepository.endVerification(BlobStoreRepository.java:1758) ~[elasticsearch-8.8.0-SNAPSHOT.jar:8.8.0-SNAPSHOT]	
	at org.elasticsearch.repositories.RepositoriesService$4.lambda$doRun$1(RepositoriesService.java:490) ~[elasticsearch-8.8.0-SNAPSHOT.jar:8.8.0-SNAPSHOT]	
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:891) ~[elasticsearch-8.8.0-SNAPSHOT.jar:8.8.0-SNAPSHOT]	
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]	
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]	
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
```	
modules/repository-gcs/src/internalClusterTest/java/org/elasticsearch/repositories/gcs/WebProxyServer.java
upstreamHttpConnection.setRequestProperty("X-Via", "test-web-proxy-server");
        int requestContentLength = -1;
        boolean chunkedRequest = false;
        while (true) {
            String requestHeader = readLine(is);
            if (requestHeader.isEmpty()) {
                
                break;
            }
            String[] headerParts = requestHeader.split(":");
            String headerName = headerParts[0].trim();
            String headerValue = headerParts[1].trim();
            if (headerName.equalsIgnoreCase("Content-Length")) {
                requestContentLength = Integer.parseInt(headerValue);
            } else if (headerName.equalsIgnoreCase("Transfer-Encoding") && headerValue.equalsIgnoreCase("chunked")) {
                chunkedRequest = true;
            }
            if (BLOCKED_HEADERS.contains(headerName) == false) {
                upstreamHttpConnection.setRequestProperty(headerName, headerValue);
            }
        }
        if (requestContentLength > 0) {
            upstreamHttpConnection.setDoOutput(true);
            try (var uos = upstreamHttpConnection.getOutputStream()) {
                uos.write(is.readNBytes(requestContentLength));
            }
        } else if (chunkedRequest) {
            upstreamHttpConnection.setDoOutput(true);
            upstreamHttpConnection.setChunkedStreamingMode(0);
            try (var uos = upstreamHttpConnection.getOutputStream()) {