-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathmethod.mjs
35 lines (34 loc) · 938 Bytes
/
method.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
export default
{
name: 'Method-related Caching Requirements',
id: 'method',
description: 'These tests check how caches handle different HTTP methods.',
spec_anchors: ['response.cacheability'],
tests: [
{
name: 'An optimal HTTP cache reuses a stored `POST` response (that has `Content-Location` with the same URL and explicit freshness) for subsequent `GET` requests',
id: 'method-POST',
kind: 'optimal',
requests: [
{
request_method: 'POST',
request_body: '12345',
request_headers: [
['Content-Type', 'text/plain']
],
response_headers: [
['Cache-Control', 'max-age=3600'],
['Content-Location', ''],
['Date', 0]
],
magic_locations: true,
pause_after: true,
setup: true
},
{
expected_type: 'cached'
}
]
}
]
}