Proxy middleware caching support
|Reported by:||amosjeffries||Owned by:|
I'm working in an environment involving reverse-proxy CDN and a web server where the PHP cache-busting Cache-Control: headers have been disabled.
Unfortunately roundcube 0.5.1 is completely unusable in its current form.
- During install and setup the administrator is faced with 4xx.
This appears to be due to roundcube leaking the non-standard 60x status codes which are also used internally by the middleware and mapped to a different irrelevant error page for final presentation. The web standards define 500 status as the correct one to output for generic server-end problems.
The attached patch http-6xx-status maps these internal status codes to 500 for final display to the client.
- Login fails to work most of the time. When it does get to the mail area the user finds themselves logged into another users account.
This is caused by reliance on the PHP defaults. Which are configurable in PHP and thus not reliable. The attached patch proxy-support adds heavy-handed no-store and private flags to the Cache-Control for all roundcube PHP outputs. This works but if someone with more knowledge is able to fine-tune it to only be sent when there really is private not-to-be-stored objects that would allow better performance.
There is one other unresolved error still occurring despite these patches.
On first page view after a new browser has been opened and logged in the mail text area displays empty and "Server Error! (error)" is displayed to the user. This will also occur apparently randomly during mail browsing.
I have tracked it down to the X-Roundcube-Request token on /?_task=mail&_remote=1&_action=list&_mbox=INBOX&_refresh=1... XMLHttpRequest requests. The browser appears to retain old values until a logout is manually performed within the current session. After which a second login uses some value roundcube will accept.
Change History (8)
comment:6 Changed 2 years ago by alec
- Component changed from Addressbook to Core functionality
- Milestone changed from later to 0.6-beta