Skip to content

[9.x] Fix middleware SetCacheHeaders with file responses - #44063

Merged
taylorotwell merged 2 commits into
laravel:9.xfrom
clementbirkle:9.x
Sep 9, 2022
Merged

taylorotwell merged 2 commits into
laravel:9.xfrom
clementbirkle:9.x

Conversation

@clementbirkle

Copy link
Copy Markdown
Contributor

The middleware "SetCacheHeaders" (cache.headers) doesn't work with file responses because in this case ! $response->getContent() is empty: https://github.com/laravel/framework/blob/9.x/src/Illuminate/Http/Middleware/SetCacheHeaders.php#L24

@driesvints suggested to me me to submit a PR for that: #44036

@taylorotwell
taylorotwell merged commit cbeb50b into laravel:9.x Sep 9, 2022
@GrahamCampbell GrahamCampbell changed the title Fix middleware "SetCacheHeaders" with file responses [9.x] Fix middleware SetCacheHeaders with file responses Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants