Test Case: cache must treat cached entity as stale when the age exceeds request max-age even if response max-age says the entry is fresh
Subcase gistStateComment
cache somethingsuccessDUT proxied the transaction and possibly cached the response
check that a given entity instance is cached and freshsuccessat the time of the request, entity instance appeared to be cached and fresh
check that a given entity instance is not cached or cached but stalefailureat the time of the request, entity instance appeared to be cached and fresh rather than being not cached or cached but stale

290.098| starting test case test_case/rfc2616/ccRespDirMsg-max-age-overMaxAge-resp
290.098| Co-Advisor version: 2.1.4b
290.098| step 1: attempting to cache entity with max-age Cache-Control directive

Subcase: cache something
290.098| starting sub-case test_case/rfc2616/cacheSmth
290.098| server accepting HTTP queries at 10.0.0.42:8081
290.098| client connecting to 10.0.0.42:8080; 3 attempt(s)
290.098| client at 10.0.0.42:55596 connected to 10.0.0.42:8080
290.098| client will send 92 bytes (92 + 0)
GET http://10.0.0.42:8081/kwzrdlyuhtyk HTTP/1.1\r\n
Host: 10.0.0.42:8081\r\n
Connection: close\r\n
\r\n

290.099| client at 10.0.0.42:55596 expects to write to 10.0.0.42:8080
290.099| client at 10.0.0.42:55596 wrote 92 bytes to 10.0.0.42:8080 ( 92 bytes so far)
290.099| client at 10.0.0.42:55596 stops writing to 10.0.0.42:8080( after 92 bytes)
290.099| client at 10.0.0.42:55596 expects to read from 10.0.0.42:8080
290.099| server at 10.0.0.42:8081 accepted connection from 10.0.0.42:57711
290.099| server at 10.0.0.42:8081 expects to read from 10.0.0.42:57711
290.099| server at 10.0.0.42:8081 read 130 bytes from 10.0.0.42:57711 ( 130 bytes so far)
290.100| server got request headers (130 bytes)
GET /kwzrdlyuhtyk HTTP/1.1\r\n
Host: 10.0.0.42:8081\r\n
Max-Forwards: 10\r\n
Connection: close\r\n
Via: 1.1 10.0.0.42:8081 (Apache/2.0.54)\r\n
\r\n

290.102| expecting no message body
290.102| expected message body format: opaque message body
290.102| no more message body data to parse
290.102| server expects no more request data (after 130 + 0 = 130 bytes)
290.103| server at 10.0.0.42:8081 stops reading from 10.0.0.42:57711( after 130 bytes)
290.103| server will send 207 bytes
HTTP/1.1 200 OK\r\n
Cache-Control: public\r\n
Last-Modified: Thu, 03 Jun 2004 22:32:10 GMT\r\n
Cache-Control: max-age=100\r\n
Date: Fri, 03 Jun 2005 22:37:01 GMT\r\n
Content-Length: 15\r\n
Connection: close\r\n
\r\n
body-vslgivatpw

290.104| server at 10.0.0.42:8081 expects to write to 10.0.0.42:57711
290.105| server at 10.0.0.42:8081 wrote 207 bytes to 10.0.0.42:57711 ( 207 bytes so far)
290.105| server at 10.0.0.42:8081 stops writing to 10.0.0.42:57711( after 207 bytes)
290.105| server stops servicing connection with 10.0.0.42:57711
290.105| server at 10.0.0.42:8081 closing connection to 10.0.0.42:57711 (read 130 bytes and wrote 207 bytes)
290.106| client at 10.0.0.42:55596 read 259 bytes from 10.0.0.42:8080 ( 259 bytes so far)
290.107| client parsed response headers (244 bytes)
HTTP/1.1 200 OK\r\n
Date: Fri, 03 Jun 2005 22:37:00 GMT\r\n
Cache-Control: public, max-age=100\r\n
Last-Modified: Thu, 03 Jun 2004 22:32:10 GMT\r\n
Content-Length: 15\r\n
Via: 1.1 10.0.0.42:8081 (Apache/2.0.54)\r\n
Connection: close\r\n
Content-Type: text/plain\r\n
\r\n

290.107| expecting 15 bytes of message body based on Content-Length header
290.107| expected message body format: opaque message body
290.107| parsed 15 bytes of message body:
body-vslgivatpw

290.107| client expects no more data (after 244 + 15 = 259 bytes)
290.107| content size: 15
290.107| client at 10.0.0.42:55596 stops reading from 10.0.0.42:8080( after 259 bytes)
290.107| client stops servicing connection with 10.0.0.42:8080
290.107| client at 10.0.0.42:55596 closing connection to 10.0.0.42:8080 (read 259 bytes and wrote 92 bytes)
290.108| server stops accepting HTTP queries at 10.0.0.42:8081
290.108| finished case: test_case/rfc2616/cacheSmth
290.108| result code: success
290.108| result reason: DUT proxied the transaction and possibly cached the response

290.108| step 2: verifying whether the entity was cached and is fresh

Subcase: check that a given entity instance is cached and fresh
290.108| starting sub-case test_case/rfc2616/checkCached-fresh
290.108| server accepting HTTP queries at 10.0.0.42:8081
290.109| client connecting to 10.0.0.42:8080; 3 attempt(s)
290.109| client at 10.0.0.42:52009 connected to 10.0.0.42:8080
290.109| client will send 118 bytes (118 + 0)
GET http://10.0.0.42:8081/kwzrdlyuhtyk HTTP/1.1\r\n
Cache-Control: max-age=8\r\n
Host: 10.0.0.42:8081\r\n
Connection: close\r\n
\r\n

290.109| client at 10.0.0.42:52009 expects to write to 10.0.0.42:8080
290.110| client at 10.0.0.42:52009 wrote 118 bytes to 10.0.0.42:8080 ( 118 bytes so far)
290.110| client at 10.0.0.42:52009 stops writing to 10.0.0.42:8080( after 118 bytes)
290.110| client at 10.0.0.42:52009 expects to read from 10.0.0.42:8080
290.110| client at 10.0.0.42:52009 read 267 bytes from 10.0.0.42:8080 ( 267 bytes so far)
290.110| client parsed response headers (252 bytes)
HTTP/1.1 200 OK\r\n
Date: Fri, 03 Jun 2005 22:37:00 GMT\r\n
Content-Type: text/plain\r\n
Last-Modified: Thu, 03 Jun 2004 22:32:10 GMT\r\n
Cache-Control: public, max-age=100\r\n
Content-Length: 15\r\n
Via: 1.1 10.0.0.42:8081 (Apache/2.0.54)\r\n
Age: 0\r\n
Connection: close\r\n
\r\n

290.111| expecting 15 bytes of message body based on Content-Length header
290.111| expected message body format: opaque message body
290.111| parsed 15 bytes of message body:
body-vslgivatpw

290.111| client expects no more data (after 252 + 15 = 267 bytes)
290.111| content size: 15
290.111| client at 10.0.0.42:52009 stops reading from 10.0.0.42:8080( after 267 bytes)
290.111| client stops servicing connection with 10.0.0.42:8080
290.111| client at 10.0.0.42:52009 closing connection to 10.0.0.42:8080 (read 267 bytes and wrote 118 bytes)
290.111| server stops accepting HTTP queries at 10.0.0.42:8081
290.112| finished case: test_case/rfc2616/checkCached-fresh
290.112| result code: success
290.112| result reason: at the time of the request, entity instance appeared to be cached and fresh

290.112| sleeping for 10 seconds to increase age of a cached entity
300.120| step 3: verifying whether the cached entity is still cached

Subcase: check that a given entity instance is not cached or cached but stale
300.120| starting sub-case test_case/rfc2616/checkCached-notORstale
300.121| server accepting HTTP queries at 10.0.0.42:8081
300.121| client connecting to 10.0.0.42:8080; 3 attempt(s)
300.121| client at 10.0.0.42:55591 connected to 10.0.0.42:8080
300.121| client will send 118 bytes (118 + 0)
GET http://10.0.0.42:8081/kwzrdlyuhtyk HTTP/1.1\r\n
Cache-Control: max-age=8\r\n
Host: 10.0.0.42:8081\r\n
Connection: close\r\n
\r\n

300.122| client at 10.0.0.42:55591 expects to write to 10.0.0.42:8080
300.122| client at 10.0.0.42:55591 wrote 118 bytes to 10.0.0.42:8080 ( 118 bytes so far)
300.122| client at 10.0.0.42:55591 stops writing to 10.0.0.42:8080( after 118 bytes)
300.122| client at 10.0.0.42:55591 expects to read from 10.0.0.42:8080
300.122| client at 10.0.0.42:55591 read 268 bytes from 10.0.0.42:8080 ( 268 bytes so far)
300.123| client parsed response headers (253 bytes)
HTTP/1.1 200 OK\r\n
Date: Fri, 03 Jun 2005 22:37:10 GMT\r\n
Content-Type: text/plain\r\n
Last-Modified: Thu, 03 Jun 2004 22:32:10 GMT\r\n
Cache-Control: public, max-age=100\r\n
Content-Length: 15\r\n
Via: 1.1 10.0.0.42:8081 (Apache/2.0.54)\r\n
Age: 10\r\n
Connection: close\r\n
\r\n

300.123| expecting 15 bytes of message body based on Content-Length header
300.123| expected message body format: opaque message body
300.124| parsed 15 bytes of message body:
body-vslgivatpw

300.124| client expects no more data (after 253 + 15 = 268 bytes)
300.124| content size: 15
300.124| client at 10.0.0.42:55591 stops reading from 10.0.0.42:8080( after 268 bytes)
300.124| client stops servicing connection with 10.0.0.42:8080
300.124| client at 10.0.0.42:55591 closing connection to 10.0.0.42:8080 (read 268 bytes and wrote 118 bytes)
300.124| server stops accepting HTTP queries at 10.0.0.42:8081
300.124| finished case: test_case/rfc2616/checkCached-notORstale
300.124| result code: failure
300.124| result reason: at the time of the request, entity instance appeared to be cached and fresh rather than being not cached or cached but stale

300.124| finished case: test_case/rfc2616/ccRespDirMsg-max-age-overMaxAge-resp
300.124| result code: violation
300.124| result reason: cache did not treat cached entity as stale when the age exceeds request max-age even if response max-age says the entry is fresh