WAP Caching Model (June 2000) Test Specification


ISSUE : wcm11ts_15-01-2002

Copyright © 1999-2002 Wireless Application Forum. Ltd. All Rights Reserved.


Preface

This document contains the assertion specification for the WAP June 2000 release of the: User Agent Caching Model technical specification.

This is the baseline specification to be used for the VSWAP June 2000 Conformance test and certification programme.

The following specifications and were used to generate the assertions:

The specification is organized such that there is a section for each relevant section of the HTTP 1.1 Specification in which assertions can be found. Assertions drawn directly from the WAP Caching Model Specification are prefixed WCM in the section headers.

For each assertion in the specifications, a corresponding entry in this test specification contains the following elements:

ID: The name by which the test is known
Class: An assertion Class as defined in IEEE Std 1003.3. These types are:
A A mandatory, testable assertion.
B A mandatory, but untestable assertion.
C An optional, testable assertion.
D An optional, but untestable assertion.
Scope: If an assertion is type C or D, this entry describes the option that needs to be supported in order to activate the test.
Text: The text of the assertion and a reference to the source specification from which the assertion is derived.
Note: Any supplementary information associated with the assertion. For example it may suggest a strategy for the test implementation of the assertion or it may propose rationale as to why a test is classified as untestable.

This specification uses the following conventions for convenience:


Table of Contents

   WCM-5 WAP Caching Model
      WCM-5.1 WAP User Agent Responsibilities
         WCM-5.1.1 WAP Interaction with the User Agent History Mechanism

   WCM-6 Time of Day Clock
      WCM-6.1 Time of Day Requests

   RFC2616 HTTP/1.1

   6 Response
      6.1 Status-Line
         6.1.1 Status Code and Reason Phrase

   10 Status Code Definitions
      10.2 Successful 2xx
         10.2.7 206 Partial Content
      10.3 Redirection 3xx
         10.3.5 304 Not Modified

   13 Caching in HTTP
      13.1 Basic Cache Behaviour
         13.1.1 Cache Correctness
         13.1.2 Warnings
      13.2 Expiration Model
         13.2.3 Age Calculations
         13.2.4 Expiration Calculations
         13.2.5 Disambiguating Expiration Values
         13.2.6 Disambiguating Multiple Responses
      13.3 Validation Model
         13.3.3 Weak and Strong Validator
         13.3.4 Rules for when to use Entity Tags and Last-Modified Dates
      13.4 Response Cachability
      13.5 Constructing Responses from Caches
         13.5.2 Non-modifiable Headers
         13.5.3 Combining Headers
         13.5.4 Combining Byte Ranges
      13.6 Caching Negotiated Responses
      13.8 Errors or Incomplete Response Cache Behaviour
      13.9 Side Effects of GET and HEAD

   14 Header Field Definitions
      14.6 Age
      14.8 Authorization
      14.9 Cache-Control
         14.9.1 What is Cachable
         14.9.2 What may be Stored by Caches
         14.9.3 Modifications of Basic Expriations Mechanism
         14.9.4 Cache Revalidation and Reload Controls
         14.9.5 No-Transform Directive
      14.21 Expires
      14.24 If-Modified-Since
      14.25 If-Match
      14.26 If-None-Match
      14.27 If-Range
      14.43 Vary
      14.45 Warning

   19 Appendices
      19.3 Tolerant Applications

WCM-5 WAP Caching Model

WCM-5.1 WAP User Agent Responsibilities

WCM-5.1.1 WAP Interaction with the User Agent History Mechanism

ID: cache/wcm/history/1
Class: A
Text: When a cached resource has the must-revalidate control attribute set, and the cached resource is stale, then the user agent revalidates the resource when going "back" in the history. [WAP Caching Model Specification section 5.5.1]
Note: First link fetches dynamically generated doc. This doc. (Page A) is stale. User follows link to Page B then back via history to Page A, which should be revalidated and present new content (a new time). So TIME_1 and TIME_2 should be different.

ID: cache/wcm/history/2
Class: A
Text: When the user agent revalidates a stale resource in the history list that contains a must-revalidate directive, the user is not informed. [WAP Caching Model Specification section 5.5.1]
Note: First link fetches dynamically generated doc. This doc. requires revalidation. Second link uses the prev tag to go back in UA history. The times must be different and the UA must not produce a warning on revalidation.

ID: cache/wcm/history/3
Class: A
Text: When a stale resource does not have a must-revalidate directive it is not revalidated when going "back" in the user agent history. [WAP Caching Model Specification section 5.5.1]
Note: First link fetches dynamically generated doc. This doc. (Page A) is stale. User follows link to page B and then returns to Page A via Back action. If Page A has not been revalidated then the times TIME_1 and TIME_2 will be the same, since the second viewing of Page A will come from the history cache.

WCM-6 Time of Day Clock

WCM-6.1 Time of Day Requests

ID: cache/wcm/tod/1
Class: B
Text: When a WAP gateway receives a WSP method request that includes a header named X-WAP.TOD, it ignores the value in the header and includes that header in the response, with the header value set to the gateway's current time of day. [WAP Caching Model Specification section 6.1]
Note: Untestable because we can not generate a request with an X-WAP.TOD header.

ID: cache/wcm/tod/2
Class: B
Text: When a WAP gateway receives a user agent request containing an X-WAP.TOD header with a date value of zero, the gateway replaces it with the gateway's current time of day. [WAP Caching Model Specification section 6.1]
Note: Untestable because we can not generate a request with an X-WAP.TOD header

RFC2616 HTTP/1.1

Test Strategy

Test assertions have been derived from the "MUST" and "MUST NOT" conformance requirements of RFC2616, Hypertext Transfer Protocol - HTTP/1.1.
Test assertions and test code derived from the "MUST" requirements of RFC2616 have been revised in line with the guidelines set out in the "WAG Working Group Liaison Statement Response: Final disposition of MUST and MUST NOT cache tests, dated Tuesday, 18 July 2000".
"The HTTP cache specification describes what types of responses MAY be cached and what MUST NOT be cached. However, there is no requirement that a cache MUST cache all responses that the specification says MAY be cached. In those cases where the specification says that such-and-such a response MUST be disregarded if it is in the cache, or MUST be re-requested, etc., there are all conditional on the original response being present in the cache. That is, the requirement are not of the form "You MUST do this" but rather, "IF you have cached a previous response, you MUST do this." What types of responses are cached is left to the discretion of the cache. Therefore, any test which requires that a previous cacheable response was, in fact, cached is flawed. Consequently, we feel that only tests for response which MUST NOT be cached can legitimately be included."

6 Response

6.1 Status-Line

6.1.1 Status Code and Reason Phrase

ID: cache/response/1
Class: B
Text: When an application receives a response with an unrecognised status code, the response is not cached. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 6.1.1]
Note: Untestable as the client's display of the initial response is unspecified.

10 Status Code Definitions

10.2 Successful 2xx

10.2.7 206 Partial Content

See section 13.4 Response Cachability for assertions relating to Partial Content responses.

10.3 Redirection 3xx

10.3.5 304 Not Modified

ID: cache/status/redirection/notmodified/1
Class: B
Text: When a 304 response is received from a conditional GET request, the 304 Not Modified response does not contain a message body [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 10.3.5]
Note: Untestable because we can not force client to make a conditional GET request.

ID: cache/status/redirection/notmodified/2
Class: B
Text: When a 304 response is received from a conditional GET request, the 304 Not Modified response includes a Date header field [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 10.3.5]
Note: Untestable because we can not force client to make a conditional GET request. Please also see the Test Strategy note at the beginning of the section.

ID: cache/status/redirection/notmodified/3
Class: B
Text: When a 304 response is received from a conditional GET request, the 304 Not Modified response includes an Expires header field. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 10.3.5]
Note: Untestable because we can not force client to make a conditional GET request. Please also see the Test Strategy note at the beginning of the section.

ID: cache/status/redirection/notmodified/4
Class: B
Text: When a 304 response is received from a conditional GET request, the 304 Not Modified response includes a Cache-Control header field. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 10.3.5]
Note: Untestable because we can not force client to make a conditional GET request. Please also see the Test Strategy note at the beginning of the section.

ID: cache/status/redirection/notmodified/5
Class: B
Text: When a conditional GET uses a weak cache validator, the request does not include entity headers other than that used for validation. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 10.3.5]
Note: Untestable because we can not force client to make a conditional GET request.

ID: cache/status/redirection/notmodified/6
Class: B
Text: When a 304 response is received from a conditional GET request and indicates an uncached entity, the response is ignored. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 10.3.5]
Note: Untestable because we can not force client to make a conditional GET request. Please also see the Test Strategy note at the beginning of the section.

ID: cache/status/redirection/notmodified/7
Class: B
Text: When a cache uses a received 304 response to update a cache entry, the cache updates the entry to reflect all new field values given in the response. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 10.3.5]
Note: Untestable because we can not force client to make a conditional GET request. Please also see the Test Strategy note at the beginning of the section.

13 Caching in HTTP

13.1 Basic Cache Behaviour

13.1.1 Cache Correctness

ID: cache/basic/correctness/1
Class: D
Scope: "The client displays 304 (Not Modified) warning messages"
Text: When a cache receives a request for a 304 (Not Modified) warning response it responds with the most up-to-date version that is available. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.1.1]
Note: Untestable, please see the Test Strategy note at the beginning of the section.

ID: cache/basic/correctness/2
Class: D
Scope: "The client displays 305 (Proxy Redirect) warning messages"
Text: When a cache receives a request for a 305 (Proxy Redirect) warning response it responds with the most up-to-date version that is available. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.1.1]
Note: Untestable, please see the Test Strategy note at the beginning of the section.

ID: cache/basic/correctness/3
Class: D
Scope: "The client displays 400-range error messages"
Text: When a cache receives a request for a 4xx warning response it responds with the most up-to-date version that is available. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.1.1]
Note: Untestable, please see the Test Strategy note at the beginning of the section.

ID: cache/basic/correctness/4
Class: D
Scope: "The client displays 500-range error messages"
Text: When a cache receives a request for a 5xx warning response it responds with the most up-to-date version that is available. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.1.1]
Note: Untestable, please see the Test Strategy note at the beginning of the section.

13.1.2 Warnings

ID: cache/basic/warnings/1
Class: D
Scope: "The client displays a warning if a cache serves a second-hand response"
Text: When a cache returns a response that is not first hand and is stale, it attaches a warning. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.1.2]
Note: Untestable, please see the Test Strategy note at the beginning of the section.

13.2 Expiration Model

13.2.3 Age Calculations

ID: cache/expiration/agecalc/1
Class: B
Text: When sending a response, a cache adds the time that the response was resident locally in the cache to the corrected_initial_age value. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.2.3]
Note: Untestable because we can not determine how long a response was resident in the server cache. Please also see the Test Strategy note at the beginning of the section.

ID: cache/expiration/agecalc/2
Class: B
Text: When a cache adds the locally resident to the correct_initial_age value of a received response, it transmits the total age, using the Age header to the next recipient cache. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.2.3]
Note: Untestable because we can not probe cache residence times. Please also see the Test Strategy note at the beginning of the section.

13.2.4 Expiration Calculations

ID: cache/expiration/excalc/1
Class: D
Scope: "The client displays Warning 13 (Heuristic expiration) messages"
Text: When a cache has computed a freshness time for a response using a heuristic and the freshness time is greater than 24 hours, it attaches a Warning 13 message. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.2.4]
Note: Untestable because we can not force the cache to generate a heuristic time. Please also see the Test Strategy note at the beginning of the section.

13.2.5 Disambiguating Expiration Values

ID: cache/expiration/disambiguating/1
Class: B
Text: When more than one response is available in a cache, the response with the more recent Date header is used. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.2.5]
Note: Untestable because we can not force the storage of multiple variants of a response in a cache. Please also see the Test Strategy note at the beginning of the section.

13.2.6 Disambiguating Multiple Responses

ID: cache/expiration/multiple/1
Class: B
Text: When the expiration time of responses generated during the same second overlap, a server does not depend on the client being able to choose deterministically between them. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.2.6]
Note: Untestable because there is no definitive action required of the server.

13.3 Validation Model

13.3.3 Weak and Strong Validator

ID: cache/validation/weakstrong/1
Class: B
Text: When a cache-conditional request is not a simple (non-subrange) GET (i.e. a POST request), the cache uses the strong comparison function to evaluate its response. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.3.3]
Note: Untestable, server needs to supply an entity tag, which cannot be guaranteed. Please also see the Test Strategy note at the beginning of the section.

13.3.4 Rules for when to use Entity Tags and Last-Modified Dates

ID: cache/validation/rules/1
Class: B
Text: When a cached entry has a strong entity tag and the associated entity value changes, the entity tag is changed. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.3.4]
Note: Untestable, server needs to supply an entity tag, which cannot be guaranteed. Please also see the Test Strategy note at the beginning of the section.

ID: cache/validation/rules/2
Class: B
Text: When an entity tag has been provided by the origin server, the client uses the tag in any cache-conditional request. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.3.4]
Note: Untestable because we can not probe Etags of cached entities. Please also see the Test Strategy note at the beginning of the section.

ID: cache/validation/rules/3
Class: B
Text: When a request contains both an entity tag and a last-modified date, the cache uses the entity tag for validation. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.3.4]
Note: Untestable because we can not generate a cache-conditional request. Please also see the Test Strategy note at the beginning of the section.

13.4 Response Cachability

ID: cache/cachability/1
Class: A
Text: When a cache receives a response with a status code other than one of 200, 203, 206, 300, 301 or 410 and the response does not contain any cache-specific header directives, the response is not cached. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.4]
Note: First link to dynamically generated document, time stamp is noted. Second link to same URL: timestamp should be different because document should come from the server not the cache.

13.5 Constructing Responses from Caches

13.5.2 Non-modifiable Headers

ID: cache/construction/nonmodifiable/1
Class: B
Text: A cache does not modify a Content-Location header in a request. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/2
Class: B
Text: A cache does not modify an Entity-Tag header in a request. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/3
Class: B
Text: A cache does not modify an Expires header in a request. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/4
Class: B
Text: A cache does not modify a Last-Modified header in a request. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/5
Class: B
Text: A cache does not modify a Content-Location header in a response. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/6
Class: B
Text: A cache does not modify an Entity-Tag header in a response. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/7
Class: B
Text: A cache does not modify an Expires header in a response. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional response.

ID: cache/construction/nonmodifiable/8
Class: B
Text: A cache does not modify a Last-Modified header in a response. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/9
Class: B
Text: A cache does not add a Content-Location header to a request, when not already present. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/10
Class: B
Text: A cache does not add an Entity-Tag header to a request, when not already present. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/11
Class: B
Text: A cache does not add an Expires header to a request, when not already present. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/12
Class: B
Text: A cache does not add a Last-Modified header to a request, when not already present. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/13
Class: B
Text: A cache does not add a Content-Location header to a response, when not already present. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/14
Class: B
Text: A cache does not add an Entity-Tag header to a response, when not already present. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/15
Class: B
Text: A cache does not add an Expires header to a response, when not already present. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/16
Class: B
Text: A cache does not add a Last-Modified header to a response, when not already present. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/17
Class: B
Text: A cache does not modify a Content-Encoding header in a response that contains the no-transform Cache-Control directive. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/18
Class: B
Text: A cache does not modify a Content-Length header in a response that contains the no-transform Cache-Control directive. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/19
Class: B
Text: A cache does not modify a Content-Range header in a response that contains the no-transform Cache-Control directive. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/20
Class: B
Text: A cache does not modify a Content-Type header in a response that contains the no-transform Cache-Control directive. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/21
Class: B
Text: A cache does not modify a Content-Encoding header in a request. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/22
Class: B
Text: A cache does not modify a Content-Length header in a request. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/23
Class: B
Text: A cache does not modify a Content-Range header in a request. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/24
Class: B
Text: A cache does not modify a Content-Type header in a request. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/25
Class: B
Text: A cache does not add a Content-Length header to a response that contains the no-transform Cache-Control directive. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/26
Class: B
Text: A cache does not add a Content-Length header to a response that contains the no-transform Cache-Control directive. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/27
Class: B
Text: A cache does not add a Content-Range header to a response that contains the no-transform Cache-Control directive. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/28
Class: B
Text: A cache does not add a Content-Type header to a response that contains the no-transform Cache-Control directive. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/29
Class: B
Text: A cache does not add a Content-Encoding header to a request. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/30
Class: B
Text: A cache does not add a Content-Length header to a request. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/31
Class: B
Text: A cache does not add a Content-Range header to a request. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

ID: cache/construction/nonmodifiable/32
Class: B
Text: A cache does not add a Content-Type header to a request. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.2]
Note: Untestable because we can not generate cache-conditional requests.

13.5.3 Combining Headers

ID: cache/construction/headers/1
Class: B
Text: Any end-to-end headers in a 304 (Not Modified) response replace the corresponding headers from the cached entry. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.3]
Note: Untestable because we can not probe cached end-to-end headers. Please also see the Test Strategy note at the beginning of the section.

13.5.4 Combining Byte Ranges

ID: cache/construction/ranges/1
Class: D
Scope: "The cache does not support Content-Range headers"
Text: The cache uses only the most recent partial response and discards other partial information. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.5.4]
Note: Untestable, please see the Test Strategy note at the beginning of the section.

13.6 Caching Negotiated Responses

ID: cache/negotiation/1
Class: D
Scope: "The server supports server-driven negotiation"
Text: When a client cache forwards a request containing an entity tag to the origin server and receives a response with a matching entity tag, the cache returns the result to the client. server has provided an expiration time. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.6]
Note: Untestable because we can not generate tailored client requests. Please also see the Test Strategy note at the beginning of the section.

ID: cache/negotiation/2
Class: D
Scope: "The server supports server-driven negotiation"
Text: When a client cache forwards a request to the origin server and receives a response of status 304 (Not Modified) without a Content-Location header or an entity tag, the response is not returned to the client. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.6]
Note: Untestable because we can not guarantee portability of server behaviour when adding headers.

ID: cache/negotiation/3
Class: B
Text: When a client updates the header fields of an entry following a matched Etag from a response, the updated entry is returned to the client. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.6]
Note: Untestable because we cannot generate tailored client requests.

13.8 Errors or Incomplete Response Cache Behaviour

There are no testable assertions in this section.

13.9 Side Effects of GET and HEAD

ID: cache/effects/1
Class: A
Text: When no expiration time is provided by the server, a cache does not treat the response to a query GET URL as fresh. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 13.9]
Note: Provide two URL-identical links to a dynamically generated page. Both with no expiration time specified. The page displays the current time (at time of generation). User compares the times. If same: page has been cached, if not same: page has not been cached.

14 Header Field Definitions

14.6 Age

ID: cache/header/age/1
Class: B
Text: When a cache receives an Age value larger than it is able to represent as a positive integer, it transmits its response using an Age header value of 2147483648 (2^31). [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.6]
Note: Untestable because we can not probe Age headers. Please also see the Test Strategy note at the beginning of the section.

ID: cache/header/age/2
Class: B
Text: When an age calculation, computed by a cache overflows, the cache trasmits its response using an Age header value of 2147483648 (2^31). [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.6]
Note: Untestable because we can not probe Age headers. Please also see the Test Strategy note at the beginning of the section.

ID: cache/header/age/3
Class: B
Text: When a cache sends a response it must include an Age header. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.6]
Note: Untestable because we can not probe Age headers. Please also see the Test Strategy note at the beginning of the section.

14.8 Authorization

ID: cache/header/authorization/1
Class: B
Text: When a shared cache receives a request containing an Authorization field, and no Cache-Control: proxy-revalidate, must-revalidate or public directive the response is not returned to any subsequent requests. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.8]
Note: Untestable because we cannot generate a tailored client request. Also deals with a shared cache.

ID: cache/header/authorization/2
Class: B
Text: When a shared cache receives a request containing an Authorization field and a Cache-Control:proxy-revalidate header, if sending the response to requests subsequent to the original request the proxy cache revalidates the response with the origin server. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.8]
Note: Untestable because we cannot generate a tailored client request. Also deals with a shared and proxy caches. Please also see the Test Strategy note at the beginning of the section.

ID: cache/header/authorization/3
Class: B
Text: When a shared cache receives a request containing an Authorization field and a Cache-Control:must-revalidate header, if sending the response to requests subsequent to the original request, then all caches revalidate the response with the origin server. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.8]
Note: Untestable because we cannot generate a tailored client request. Also deals with a shared and proxy caches. Please also see the Test Strategy note at the beginning of the section.

14.9 Cache-Control

14.9.1 What is Cachable

ID: cache/header/control/cachable/1
Class: B
Text: A shared cache does not store any response that contains a Cache-Control:private directive. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.9.1]
Note: Untestable because it deals with a shared cache.

ID: cache/header/control/cachable/2
Class: A
Text: A cache does not store any response that contains a Cache-Control: no-cache directive. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.9.1]
Note: Provide two URL-identical links to a dynamically generated page. The page displays the current time (at time of generation). User compares the times. If same: page has been cached, if not same: page has not been cached.

14.9.2 What may be Stored by Caches

ID: cache/header/control/stored/1
Class: B
Text: A cache does not store a request that contains a Cache-Control: no-store directive. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.9.2]
Note: Untestable because we can not generate a tailored request.

ID: cache/header/control/stored/2
Class: B
Text: A cache does not store a response that was obtained from a request containing a Cache-Control:no-store directive. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.9.2]
Note: Untestable because we can not generate a tailored request.

14.9.3 Modifications of Basic Expriations Mechanism

ID: cache/header/control/modifications/1
Class: D
Scope: "The client displays Warning 10 (Response is stale) messages"
Text: When a stale response is served from a request containing a max-stale directive, the response is served with an attached Warning 10 ( Response is stale) header. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.9.3]
Note: Untestable because we can not generated cache-conditional requests Please also see the Test Strategy note at the beginning of the section.

ID: cache/header/control/modifications/2
Class: D
Scope: "The client displays Warning 10 (Response is stale) messages"
Text: When the expiration time of a response is overridden by the cache, the response is served with an attached warning 10 (Response is stale) header. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.9.3]
Note: Untestable because we can not portably control the cache's expiration time override. Please also see the Test Strategy note at the beginning of the section.

ID: cache/header/control/modifications/3
Class: B
Text: When a response includes an s-maxage directive, then for a shared cache the maximum age specified by this directive overrides the maximum age specified by either the max-age directive or the Expires header [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.9.3]
Note: Untestable because we can not portably control the cache's expiration time override. Please also see the Test Strategy note at the beginning of the section.

ID: cache/header/control/modifications/4
Class: B
Text: The s-maxage directive must always be ignored by a private cache. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.9.3]
Note: Untestable because we can not portably control the cache's expiration time override. Please also see the Test Strategy note at the beginning of the section.

14.9.4 Cache Revalidation and Reload Controls

ID: cache/header/control/revalidation/1
Class: B
Text: When a server receives a request containing a Cache-Control: no-cache directive it does not respond with a cached response. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.9.4]
Note: Untestable because we can not generate a tailored request.

ID: cache/header/control/revalidation/2
Class: B
Text: When a server receives a request containing a Pragma: no-cache directive it does not respond with a cached response. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.9.4]
Note: Untestable because we can not generate a tailored request.

ID: cache/header/control/revalidation/3
Class: A
Text: When a cache fails to revalidate a stale response containing a must-revalidate directive, it does not serve the response to the requester. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.9.4]
Note: Provide two URL-identical links to a dynamically generated page. The page displays the current time (at time of generation). User compares the times. If same: page has been cached, if not same: page has not been cached.

ID: cache/header/control/revalidation/4
Class: D
Scope: "The client displays 504-range error messages"
Text: When a cache is unable to revalidate a stale response containing a must-revalidate directive, it generates a 504 (Gateway Timeout) warning and does not return the requested response. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.9.4]
Note: Untestable because it is not possible to portably simulate connection failure. Please also see the Test Strategy note at the beginning of the section.

ID: cache/header/control/revalidation/5
Class: D
Scope: "The client displays Warning 14 (Response is stale) warning messages"
Text: When a cache returns a stale unvalidated response containing a must-revalidate directive, it generates a warning. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.9.4]
Note: Severe connectivity restraints are not (portably) testable. Please also see the Test Strategy note at the beginning of the section.

ID: cache/header/control/revalidation/6
Class: B
Text: When a cache receives a request for a stale cache entry with a Cache-Control: must-revalidate directive it must revalidate prior to any response. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.9.4]
Note: Untestable, please see the Test Strategy note at the beginning of the section. Please also see the Test Strategy note at the beginning of the section.

14.9.5 No-Transform Directive

ID: cache/header/control/notransform/1
Class: B
Text: When a response includes a Content-Encoding header and a no-transform directive then the Content-Encoding header is not modified by the cache. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.9.5]
Note: Untestable because we can not probe cached headers.

ID: cache/header/control/notransform/2
Class: B
Text: When a response includes a Content-Length header and a no-transform directive then the Content-Length header is not modified by the cache. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.9.5]
Note: Untestable because we can not probe cached headers.

ID: cache/header/control/notransform/3
Class: B
Text: When a response includes a Content-Range header and a no-transform directive then the Content-Range header is not modified by the cache. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.9.5]
Note: Untestable because we can not probe cached headers.

ID: cache/header/control/notransform/4
Class: B
Text: When a response includes a Content-Type header and a no-transform directive then the Content-Type header is not modified by the cache. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.9.5]
Note: Untestable because we can not probe cached headers.

14.21 Expires

ID: cache/header/expires/1
Class: B
Text: When an entry contains an Expires header the date and time are expressed in RFC1123 format. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.21]
Note: Untestable because we can not probe cached headers. Please also see the Test Strategy note at the beginning of the section.

ID: cache/header/expires/2
Class: A
Text: When an entry contains an Expires header with a date value that is not stored in RFC1123 format then the entry is treated as stale. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.21]
Note: Provide two URL-identical links to a dynamically generated page. The page displays the current time (at time of generation). User compares the times. If same: page has been cached, if not same: page has not been cached. Please see the Test Strategy note at the beginning of the section.

14.24 If-Modified-Since

ID: cache/header/ifmodsince/1
Class: D
Scope: "The client displays 304 (Not Modified) warning messages"
Text: When a GET request has been made using an If-Modified-Since header and the variant in the server cache has not been modified since the If-Modified-Since date given, a 304 (Not Modified) response is returned. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.24]
Note: Untestable because we can not generate a tailored client request. Please also see the Test Strategy note at the beginning of the section.

14.25 If-Match

ID: cache/header/ifmatch/1
Class: B
Text: When a server receives an If-Match request, it uses the Strong Comparison function to compare If-Match entity tags. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.25]
Note: Untestable because we can not generate a tailored client request. Please also see the Test Strategy note at the beginning of the section.

ID: cache/header/ifmatch/2
Class: B
Text: When no entity tags match in a list taken from an If-Match request, the requested GET method is not performed. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.25]
Note: Untestable because we can not generate a tailored client request.

ID: cache/header/ifmatch/3
Class: D
Scope: "The client displays 412 (Precondition Failed) warning messages"
Text: When no entity tags match in a list taken from an If-Match request, a 412 (Precondition Failed) response is returned. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.25]
Note: Untestable because we can not generate a tailored client request. Please also see the Test Strategy note at the beginning of the section.

ID: cache/header/ifmatch/4
Class: D
Scope: "The client displays 412 (Precondition Failed) warning messages"
Text: When a * is present in an If-Match request and no entity exists in the cache, a 412 (Precondition Failed) response is returned. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.25]
Note: Untestable because we can not generate a tailored client request. Please also see the Test Strategy note at the beginning of the section.

ID: cache/header/ifmatch/5
Class: B
Text: When a request results in anything other than a reply with 2xx status then the server will not attempt to update any resources in the If-Match header. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.25]
Note: Untestable because we cannot generate a tailored client request. Please also see the Test Strategy note at the beginning of the section.

ID: cache/header/ifmatch/6
Class: B
Text: When a server receives a request containing an If-Match header referring to an entity which no longer matches the server's representation of the resource then the request is not performed. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.25]
Note: Untestable because we cannot generate a tailored client request.

14.26 If-None-Match

ID: cache/header/ifnonematch/1
Class: B
Text: When a request is made to a server which contains an If-None-Match header with the value "*" and a current representation exists for that resource then the server does NOT perform the requested methods. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.26]
Note: Untestable because we can not generate a tailored client request.

ID: cache/header/ifnonematch/2
Class: B
Text: When a GET request is made to a server which contains an If-None-Match header and one or more entity tags in the header match any of the entity tags of the current representation of the requested resource then the server does not perform the requested methods. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.26]
Note: Untestable because we can not generate a tailored client request.

ID: cache/header/ifnonematch/3
Class: D
Scope: "The client displays 412 (Precondition Failed) warning messages"
Text: When a server does not perform a requested method that is not a GET or HEAD method, due to the action of an If-None-Match header then the server responds with a status 412 (Precondition Failed) message. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.26]
Note: Untestable because we can not generate a tailored client request. Please also see the Test Strategy note at the beginning of the section.

ID: cache/header/ifnonematch/4
Class: B
Text: When a request results in anything other then a reply with 2xx status then the server will not attempt to update any resources in the If-None-Match header. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.26]
Note: Untestable because we can not generate a tailored client request. Please also see the Test Strategy note at the beginning of the section.

14.27 If-Range

ID: cache/header/ifrange/1
Class: B
Text: When a server receives a request with an If-Range header, but not a Range header it is ignored. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.27]
Note: Untestable because we can not generate a tailored client request. Please also see the Test Strategy note at the beginning of the section.

ID: cache/header/ifrange/2
Class: D
Scope: "The server does not support the sub-range operation"
Text: When the server does not support the sub-range operation, a request containing an If-Range header is ignored. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.27]
Note: Untestable because we can not generate a tailored client request. Please also see the Test Strategy note at the beginning of the section.

14.43 Vary

ID: cache/header/vary/1
Class: B
Text: When a cache receives a request for an entry that contains a Vary header and the headers named in the cache VARY header are not present in the request header then the requested entry is not served. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.43]
Note: Untestable because we can not generate a tailored client request.

ID: cache/header/vary/2
Class: B
Text: When a cache receives a request for an entry that contains a Vary header and the cached selecting request headers do not match the requested selecting request headers then the requested entry is not served. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.43]
Note: Untestable because we can not generate a tailored client request.

ID: cache/header/vary/3
Class: B
Text: When a cache receives a request for an entry that contains a Vary header with the field value "*" it is forwarded to the origin server. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.43]
Note: Untestable because we can not generate a tailored client request. Please also see the Test Strategy note at the beginning of the section.

14.45 Warning

ID: cache/header/warning/1
Class: C
Scope: "The client displays Warning header messages"
Text: When a cache receives a warning header with a response it is preserved in the cache (not deleted). [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.45]
Note: Provide two URL-identical links to a dynamically generated page. The page displays the current time (at time of generation). User compares the times. If same: page has been cached, if not same: page has not been cached. A Warning header is generated in both cases. Expect to see warning both times.

ID: cache/header/warning/2
Class: D
Scope: "The client displays Warning header messages"
Text: When the cache removes warning headers from a validated entry, warning headers received from the validating response are added to the entry. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.45]
Note: Untestable, please see the Test Strategy note at the beginning of the section.

ID: cache/header/warning/3
Class: D
Scope: "The client displays Warning 10 (Response is stale) messages"
Text: When a response is returned as stale, it includes a Warning 10 (Response is stale) header. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.45]
Note: Untestable, please see the Test Strategy note at the beginning of the section.

ID: cache/header/warning/4
Class: D
Scope: "The client displays Warning 11 (Revalidation failed) messages"
Text: When a validation request fails due to inability to connect to the server, the cache includes a Warning 11 (Revalidation Failed) header in its response. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.45]
Note: No portable way of forcing a connection failure during test.

ID: cache/header/warning/5
Class: D
Scope: "The client displays Warning 14 (Response is stale) warning messages"
Text: When a cache applies a Content-Encoding transformation to a response, it includes a Warning 14 (Transformation Applied) header in the response. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.45]
Note: Untestable due to inability to control cache generation of headers.

ID: cache/header/warning/6
Class: C
Scope: "The client displays Warning 14 (Response is stale) warning messages"
Text: When a cache receives an entity with a warning 14 (Transformation Applied) it does not delete the header. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.45]
Note: Warning header generated in both cases. Header should not be removed - warning expected in both cases.

ID: cache/header/warning/7
Class: C
Scope: "The client displays Warning 14 (Response is stale) warning messages"
Text: When a cache has re-validated a response containing a Warning 14 (Transformation Applied ) header, it does not delete the header. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 14.45]
Note: Provide two URL-identical links to a dynamically generated page. The page displays the current time (at time of generation). First doc. should provide warning. must-revalidate header provided means that second doc. should be revalidates and also provide warning.

19 Appendices

19.3 Tolerant Applications

ID: cache/appendices/applications/1
Class: B
Text: When an implementation internally represents a parsed Expires date it does not do so as later than the proper value. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 19.3]
Note: Can not probe date headers.

ID: cache/appendices/applications/2
Class: B
Text: When an expiration calculation or comparison is performed GMT is used. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 19.3]
Note: Can not probe date headers. Please also see the Test Strategy note at the beginning of the section.

ID: cache/appendices/applications/3
Class: B
Text: When the calculation or comparison of an age or expiration time is made it is not influenced by the local time zone. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 19.3]
Note: Can not probe date headers.

ID: cache/appendices/applications/4
Class: B
Text: When an HTTP header carries a non-GMT date value it is converted into GMT. [Hypertext Transfer Protocol -- HTTP/1.1 Specification section 19.3]
Note: Can not probe date headers. Please also see the Test Strategy note at the beginning of the section.


Valid HTML 4.0!