Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #36833 [HttpKernel] Fix that the
Store
would not save responses…
… with the X-Content-Digest header present (mpdude) This PR was squashed before being merged into the 3.4 branch. Discussion ---------- [HttpKernel] Fix that the `Store` would not save responses with the X-Content-Digest header present | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Responses fetched from upstream sources might have a `X-Content-Digest` header, for example if the Symfony Cache is used upstream. This currently prevents the `Store` from saving such responses. In general, the value of this header should not be trusted. As I consider this header an implementation detail of the `Store`, the fix tries to be local to that class; we should not rely on the `HttpCache` or other classes to remove untrustworthy headers for us. This fixes the issue that when using the `HttpCache` in combination with the Symfony HttpClient, responses that have also been cached upstream in an instance of `HttpCache` are not cached locally. It adds the overhead of re-computing the content digest every time the `HttpCache` successfully re-validated a response. Commits ------- d8964fb [HttpKernel] Fix that the `Store` would not save responses with the X-Content-Digest header present
- Loading branch information