[MAGNOLIA-5828] Magnolia sends empty Pragma header for login page CSS Created: 09/Jul/14 Updated: 21/Jul/14 Resolved: 18/Jul/14 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.5.21 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Robert Šiška | Assignee: | Robert Šiška |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | vpro | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Template: |
|
||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||||||
| Date of First Response: | |||||||||||||||||
| Description |
|
http://redbot.org/?uri=http%3A%2F%2Fdemo.magnolia-cms.com%2F.resources%2FloginForm%2Flogin.css says "The Pragma header is being used in an undefined way". The CSS for the login page is served with a Pragma header without a value, while the HTTP spec only defines 'Pragma: no-cache'. |
| Comments |
| Comment by Milan Divilek [ 16/Jul/14 ] |
|
Reopen: String pragma = ((WebContext) MgnlContext.getInstance()).getRequest().getHeader("Pragma"); return cacheControl != null && (cacheControl.equals("no-cache") || pragma.equals("no-cache")); If the request did not include "Pragma" header then this code will end up with NPE. |
| Comment by Federico Grilli [ 18/Jul/14 ] |
|
Looks like the check for null Pragma header is missing in the 4.5 branch. Btw, I'd simplify the check like this in order to prevent NPE return "no-cache".equals(cacheControl) || "no-cache".equals(pragma); |
| Comment by Robert Šiška [ 21/Jul/14 ] |
|
Oops, I forgot to integrate it. |