tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

README.md (3883B)


HTTP Caching Tests

These tests cover HTTP-specified behaviours for caches, primarily from RFC9111, but as seen through the lens of Fetch.

A few notes:

https://www.rfc-editor.org/rfc/rfc9111.html#section-2-2); some tests expecting a response to be cached might fail because the client chose not to cache it, or chose to race the cache with a network request.

cache that's not well defined; see [this issue](https://github.com/whatwg/fetch/issues/354).

in Fetch; tests are included here for interest only.

shift-reloading, despite the cache mode staying the same.

which also caters to server/CDN implementations.

Test Format

Each test run gets its own URL and randomized content and operates independently.

Each test is an an array of objects, with the following members:

Possible members of a request object:

emit in the request.

and phrase to return.

emit in the response. These values will also be checked like expectedresponseheaders, unless there is a third value that is false. See below for special handling considerations.

the test identifier.

If not set, the value of response_status[0] will be used; if that is not set, 200 will be used.

headers to check the request for.

headers to check the response for. See also response_headers.

Some headers in response_headers are treated specially:

See the source for exact details.