User tests: Successful: Unsuccessful:
The setting of headers like 'Content-Type' is currently happening in method respond
of class JApplicationWeb
.
Unfortunately, the system cache plugin stores contents at event onAfterRender
which is triggered before respond
is executed. Therefore, certain headers are missing when serving from the cache.
This creates problems especially if we are serving content that is not of Content-Type text/html
.
This pull request changes the plugin so that the cache is created only after these headers are set by using event onAfterRespond
instead of onAfterRender
.
Since gzip compression already happened at this point, the compressed contents are stored in the cache and therefore no further compression is necessary when serving cached contents. Thus, the second change in the plugin file.
For testing please make sure that everything works as before and check that the Content-Type
header is also cached now.
Status | New | ⇒ | Pending |
Easy | No | ⇒ | Yes |
Category | ⇒ | Cache |
Labels |
Added:
?
|
Yes, I added instructions above.
Unfortunately, it doesn't seem to be possible to add extensions archives as attachments here, so I added an issue on Joomlacode and attached the test component there:
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=34149&start=0
@Chraneco I tried the component but initially the image wouldn't show. I do get the link but when I click it I get an empty page... Hope you can fix the component. You can mail me component directly: rick@r2h.nl
@RickR2H Sorry, the sample image in Joomla I was using was apparently deleted in one of the latest versions. I updated the component with a path to another image and sent it to your email address.
If it still doesn't work please check whether the image images/sampledata/fruitshop/apple.jpg
exists in your Joomla installation (it's there in a fresh new instance).
Thanks for testing!
Patch works! Thanks @Chraneco for putting all the effort in making a component to test this PR.
Works here! Thanks.
Status | Pending | ⇒ | Ready to Commit |
RTC based on tests by @RickR2H and @RichardR2H.
Labels |
Added:
?
|
Milestone |
Added: |
Milestone |
Removed: |
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-09-09 03:09:43 |
Closed_By | ⇒ | roland-d |
Labels |
Removed:
?
|
Milestone |
Milestone |
Added: |
Milestone |
Added: |
Milestone |
hello @Chraneco
Thank you for your contribution.
Please provide clear test instructions to be able to test / reproduce this issue.
If no reply is received within 4 weeks we will close this issue.
Thanks for understanding!
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6955.