Bug 64406 - HTTP CacheManager - add option to check all headers
Summary: HTTP CacheManager - add option to check all headers
Status: NEW
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 5.2.1
Hardware: All All
: P2 enhancement (vote)
Target Milestone: JMETER_5.3.0
Assignee: JMeter issues mailing list
Depends on:
Reported: 2020-05-03 10:45 UTC by geert.draelants
Modified: 2020-05-03 10:45 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description geert.draelants 2020-05-03 10:45:44 UTC
The HTTP CacheManager only checks the last occurrence of Cache-Control and Expires header. So if you have a malfunctioning webserver that sends multiple contradicting headers you might not always detect it with JMeter.

Also the CacheManager does not have support for the Pragma header. Yes, this last one is deprecated with HTTP 1.1 but we've found that e.g. IE 11 still processes it. 

I would like to add support for 2 things:
(1) add an option to process all Cache-Control and Expires headers and not just the last one in the list
This would also enable 'strict' processing of the headers. By this I mean that if multiple contradicting instructions are found then we should favour the one that results on no caching or the shortest amount of caching.
E.g. if you get a header like 'Cache-Control: max-age=86400, max-age=100' then choose 'max-age=100'. Similar if multiple Expires headers are found, take the one that is the earliest to expire.

(3) add an option to process 'Pragma: no-cache' header as if it were 'Cache-Control: no-cache', regardless of the HTTP version.