You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by bu...@apache.org on 2009/06/30 21:55:12 UTC

DO NOT REPLY [Bug 47461] New: Update Cache Manager to handle Expires HTTP header

https://issues.apache.org/bugzilla/show_bug.cgi?id=47461

           Summary: Update Cache Manager to handle Expires HTTP header
           Product: JMeter
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTTP
        AssignedTo: jmeter-dev@jakarta.apache.org
        ReportedBy: chris@cope360.com


Created an attachment (id=23915)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23915)
diff of code implementing feature

This is an enhancement to the Cache Manager which can be included in HTTP test
plans to support cache logic based on the HTTP Expires header.  

When a web browser receives a response with a future expires header, it may
safely reuse that cached response until the expiration date without making any
request to the server.  

The HTTP specification allows for dates up to one year in the future, but in
practice many websites use dates very far in the future.  This technique is
described at http://www.askapache.com/htaccess/apache-speed-expires.html.  For
the purposes of this feature, how far in the future the content expires is not
relevant.

The attached diff implements logic to simulate browser behavior.  When a
cacheable response is received, the expiration date is remembered.  Subsequent
requests for the same URL will check the cache and short circuit the request if
a valid (not yet expired) response is available in the cache.

This is my first attempt at JMeter code and I'm sure this could be improved by
someone more familiar with the project.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 47461] Update Cache Manager to handle Expires HTTP header

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47461

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Sebb <se...@apache.org> 2009-11-16 16:20:28 UTC ---
Tnanks for the patch, applied:



I changed the code a bit:
- use DateUtils from HttpClient 3.1 to parse the Expiry date
- parse the Expiry date once rather than each time
- made the new behaviour optional
- only apply the Expires checking to GET requests
- apply the processing to the HttpClient sampler as well

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org