Skip to content

Commit

Permalink
Merge branch '4.4' into 5.1
Browse files Browse the repository at this point in the history
* 4.4:
  Remove headers with internal meaning from HttpClient responses
  • Loading branch information
fabpot committed Sep 2, 2020
2 parents 05293dd + cdf1e9b commit f855601
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, int $type = HttpKernelInterface::MASTER

$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 f855601

Please sign in to comment.