Skip to content

Commit

Permalink
Remove headers with internal meaning from HttpClient responses
Browse files Browse the repository at this point in the history
  • Loading branch information
mpdude authored and fabpot committed Sep 2, 2020
1 parent f972768 commit 8e8d0ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions HttpClientKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQ

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

$response->headers->remove('X-Body-File');
$response->headers->remove('X-Body-Eval');
$response->headers->remove('X-Content-Digest');

$response->headers = new class($response->headers->all()) extends ResponseHeaderBag {
protected function computeCacheControlValue(): string
{
Expand Down

0 comments on commit 8e8d0ed

Please sign in to comment.