-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
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
Fix EZP-21547: headers not sent for cached errors #758
Conversation
Maybe the correct way would be not to cache error page at all? |
Well, except that we don't have Symfony here. I haven't traced back the whole history, but the use-case seems quite clear to me: you have a members section, and point people to an entry page of this section, to show them a login screen OR a registration form. If the page is heavily requested and uncached, the load on the system might be quite high. It isn't ideal from an HTTP cache perspective, but after all it is not HTTP cache :-) |
+1 |
1 similar comment
+1 |
I'm wondering if @dpobel isn't -1 on the heade( $headers[] = ... ) part... :-) |
+1 |
I'm not fan of this syntax, but I can live with that anyway :) |
Syntax changed, merging. |
The headers are added to the module result, and stored in cache. They are then sent to the browser when rendering the result, cached or not.
Merged to master. |
Extra commit: 1f86c9a. |
Fixes https://jira.ez.no/browse/EZP-21547.
Maybe not the right way to do it, but it at least highlights what needs to be fixed.
Testing
Without the patch, if you go to http://ez/Media/ as anonymous user, you get a 401. If you reload, you will get a 200 OK.
With the patch, you will consistently get a 401.