Bug 63574 - HTTP Cache Manager does not cache resource if Cache-Control header is missing
Summary: HTTP Cache Manager does not cache resource if Cache-Control header is missing
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.13
Hardware: All All
: P2 normal (vote)
Target Milestone: JMETER_5.2
Assignee: JMeter issues mailing list
URL:
Keywords: FixedInTrunk
Depends on:
Blocks:
 
Reported: 2019-07-20 22:22 UTC by Flavio Pepino
Modified: 2019-07-28 09:15 UTC (History)
1 user (show)



Attachments
HTTP CACHE MANAGER (60.86 KB, image/png)
2019-07-20 22:22 UTC, Flavio Pepino
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Flavio Pepino 2019-07-20 22:22:05 UTC
Created attachment 36669 [details]
HTTP CACHE MANAGER

ON the jmeter.apache.org, there is a file new-style.css that I'd want to add to cache. However, this file is not cached by using the HTTP Cache Manager with the default options. The file has two caching headers Last-Modified  and  ETag. 

In my view, that file should be cached in conformity to its headers.
It's easy to reproduce my question. Just add one HTTP sampler to Jmeter Home and iterate two times. After that, examine the view result tree, looking for new-style.css in both iterations.
Comment 1 Philippe Mouawad 2019-07-28 09:15:30 UTC
My understanding of this https://paulcalvano.com/index.php/2018/03/14/http-heuristic-caching-missing-cache-control-and-expires-headers-explained/ and rfc leads to the fix I made.

@Team, can you please review and confirm that I am correct ?

Thanks
Comment 2 Philippe Mouawad 2019-07-28 09:15:57 UTC
This is an automated email from the ASF dual-hosted git repository.

pmouawad pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new 5883d81  Bug 63574 - HTTP Cache Manager does not cache resource if Cache-Control header is missing
5883d81 is described below

commit 5883d81abf5f0b4e7f4134aa6560ba21a62f5c43
Author: pmouawad <p.mouawad@ubik-ingenierie.com>
AuthorDate: Sun Jul 28 11:14:31 2019 +0200

    Bug 63574 - HTTP Cache Manager does not cache resource if Cache-Control
    header is missing

    This resolves Bug 63574
---
 .../jmeter/protocol/http/control/CacheManager.java |  4 ++--
 .../http/control/TestCacheManagerBase.java         | 22 ++++++++++++++++++++++
 xdocs/changes.xml                                  |  3 ++-
 3 files changed, 26 insertions(+), 3 deletions(-)
Comment 3 The ASF infrastructure team 2022-09-24 20:38:17 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5121