Skip to content

Commit 8e8d0ed

Browse files
mpdudefabpot
authored andcommitted
Remove headers with internal meaning from HttpClient responses
1 parent f972768 commit 8e8d0ed

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

HttpClientKernel.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQ
5858

5959
$response = new Response($response->getContent(!$catch), $response->getStatusCode(), $response->getHeaders(!$catch));
6060

61+
$response->headers->remove('X-Body-File');
62+
$response->headers->remove('X-Body-Eval');
63+
$response->headers->remove('X-Content-Digest');
64+
6165
$response->headers = new class($response->headers->all()) extends ResponseHeaderBag {
6266
protected function computeCacheControlValue(): string
6367
{

0 commit comments

Comments
 (0)