We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symfony version(s) affected: 5.0 & 4.4
Description
When the AbstractSessionListener modifies the Response Cache-Control headers automatically, it is not reflected in the Symfony Profiler.
Example controller:
/** * @Route("/bug", name="demo") */ public function index() { $response = new BinaryFileResponse(__FILE__, 200); $response->setPublic(); $response->headers->addCacheControlDirective("immutable"); $response->setMaxAge(3600); return $response; }
Resulting curl command on the controller:
curl
$ curl -I https://127.0.0.1:8000/bug HTTP/2 200 accept-ranges: bytes cache-control: immutable, max-age=0, must-revalidate, private content-type: text/x-php;charset=UTF-8 date: Sun, 17 May 2020 12:07:36 GMT expires: Sun, 17 May 2020 12:07:36 GMT last-modified: Sun, 17 May 2020 11:54:28 GMT x-debug-token: c914a6 x-debug-token-link: https://127.0.0.1:8000/_profiler/c914a6 x-powered-by: PHP/7.4.5 x-robots-tag: noindex content-length: 571
What is shown in the Profiler Response tab:
How to reproduce
A reproducer is available here: https://github.com/marcw/reproducer-symfony-bug-http-response-profiler.
Please:
symfony serve
curl -I https://localhost:8000/bug
https://127.0.0.1:8000/_profiler/latest?limit=10
Possible Solution
A possible solution was PR #36789 but it is in the process of being reverted (See #36838) as it caused the Debug toolbar to disappear (See #36836).
Another solution would be to ease the debugging when the Response is modified. A warning in the logs would be helpful as well.
The text was updated successfully, but these errors were encountered:
Hey, thanks for your report! There has not been a lot of activity here for a while. Is this bug still relevant? Have you managed to find a workaround?
Sorry, something went wrong.
Let's keep this bug open, @carsonbot.
No branches or pull requests
Symfony version(s) affected: 5.0 & 4.4
Description
When the AbstractSessionListener modifies the Response Cache-Control headers automatically, it is not reflected in the Symfony Profiler.
Example controller:
Resulting
curl
command on the controller:What is shown in the Profiler Response tab:
How to reproduce
A reproducer is available here: https://github.com/marcw/reproducer-symfony-bug-http-response-profiler.
Please:
symfony serve
curl -I https://localhost:8000/bug
https://127.0.0.1:8000/_profiler/latest?limit=10
and go to the Response tab.Possible Solution
A possible solution was PR #36789 but it is in the process of being reverted (See #36838) as it caused the Debug toolbar to disappear (See #36836).
Another solution would be to ease the debugging when the Response is modified. A warning in the logs would be helpful as well.
The text was updated successfully, but these errors were encountered: