Forum Discussion
Paul_97278
Nimbostratus
Mar 29, 2010Compare cookie last accessed date?
“Can the F5 compare the value of HTTP header If-modified-since (or any other header), to the value of a cookie?”
The F5 should be able to detect that the value of cookie “LastAccessed” ...
hoolio
Cirrostratus
Mar 29, 2010Hi Paul,
Is that an actual example request? If so, does the client actually send a cookie with a name of LastAccessed? The cookie looks a bit odd, as spaces should be percent encoded per the HTTP RFC's.
Anyhow, you could use HTTP::cookie (Click here) to parse the cookie value, HTTP::header (Click here) to get the If-Modified-Since header value, getfield (Click here) to parse up to the semi-colon, clock scan (Click here) to convert the two timestamps to unix time and then expr (Click here) compare the two. You can use HTTP::respond (Click here) to send a 304 response.
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
