|Summary:||HTTP Cache Manager doesn't respect Vary Header contract|
|Product:||JMeter||Reporter:||Gilles Scokart <gscokart>|
|Component:||HTTP||Assignee:||JMeter issues mailing list <issues>|
|Attachments:||Do not cache responses with Vary header|
Description Gilles Scokart 2015-06-26 13:49:30 UTC
When we perform multiple HTTP request to the same URL but with different headers, the client must cache the response according to the value of the 'Vary' header in the response. Currently, I have the impression it is not the case. I have make a scenario with 2 HTTP Request, one with a header 'Accept : application/json' and the other with the header 'text/plain' (and my server set the header 'Vary' to 'Accept', and the header 'Cache-Control' to 'no-transform, max-age=86400'). When caching is activated, I see only one of the 2 request in the aggregated graph results.
Comment 1 Felix Schumacher 2015-07-02 18:36:13 UTC
Created attachment 32881 [details] Do not cache responses with Vary header As a simple countermeasure to the described problem we could forbid to store http respones that have a Vary header with any value in it. A more complex solution would have to cache multiple responses for one url depending on the request headers. I think we should start with the simple version and implement the complex one on demand only.
Comment 2 Philippe Mouawad 2015-07-04 13:15:50 UTC
+1 for me
Comment 3 Felix Schumacher 2015-07-12 16:29:57 UTC
Date: Sun Jul 12 16:25:08 2015 New Revision: 1690478 URL: http://svn.apache.org/r1690478 Log: Do not cache http samples that have a Vary header. Bugzilla Id: 58079 Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPConstantsInterface.java jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java jmeter/trunk/xdocs/changes.xml jmeter/trunk/xdocs/usermanual/component_reference.xml