Set CORS preflight requests' mode to cors

This commit is contained in:
Vincent Ricard 2020-10-14 21:40:59 +02:00
parent 4c3247e480
commit 5b40068587
10 changed files with 137 additions and 390 deletions

View file

@ -1,12 +0,0 @@
[cors-origin.any.worker.html]
[cors-origin]
expected: FAIL
[CORS preflight [PUT\] [origin OK\]]
expected: FAIL
[cors-origin.any.html]
[CORS preflight [PUT\] [origin OK\]]
expected: FAIL

View file

@ -1,60 +1,18 @@
[cors-preflight-not-cors-safelisted.any.html]
[Need CORS-preflight for content-language/@ header]
expected: FAIL
[Need CORS-preflight for content-language/\x01 header]
expected: FAIL
[Need CORS-preflight for accept-language/@ header]
expected: FAIL
[Need CORS-preflight for accept/" header]
expected: FAIL
[Need CORS-preflight for accept-language/\x01 header]
expected: FAIL
[Need CORS-preflight for content-type/text/plain; long=0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901 header]
expected: FAIL
[Need CORS-preflight for accept/012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 header]
expected: FAIL
[Need CORS-preflight for content-type/text/html header]
expected: FAIL
[Need CORS-preflight for test/hi header]
expected: FAIL
[cors-preflight-not-cors-safelisted.any.worker.html]
[Need CORS-preflight for content-language/@ header]
expected: FAIL
[Need CORS-preflight for content-language/\x01 header]
expected: FAIL
[Need CORS-preflight for accept-language/@ header]
expected: FAIL
[Need CORS-preflight for accept/" header]
expected: FAIL
[Need CORS-preflight for accept-language/\x01 header]
expected: FAIL
[Need CORS-preflight for content-type/text/plain; long=0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901 header]
expected: FAIL
[Need CORS-preflight for accept/012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 header]
expected: FAIL
[cors-preflight-not-cors-safelisted]
expected: FAIL
[Need CORS-preflight for content-type/text/html header]
expected: FAIL
[Need CORS-preflight for test/hi header]
expected: FAIL

View file

@ -1,11 +1,41 @@
[cors-preflight-redirect.any.html]
type: testharness
[Redirection 301 after preflight failed]
expected: FAIL
[Redirection 302 after preflight failed]
expected: FAIL
[Redirection 303 after preflight failed]
expected: FAIL
[Redirection 307 after preflight failed]
expected: FAIL
[Redirection 308 after preflight failed]
expected: FAIL
[cors-preflight-redirect.any.worker.html]
type: testharness
[cors-preflight-redirect]
expected: FAIL
[Redirection 301 after preflight failed]
expected: FAIL
[Redirection 302 after preflight failed]
expected: FAIL
[Redirection 303 after preflight failed]
expected: FAIL
[Redirection 307 after preflight failed]
expected: FAIL
[Redirection 308 after preflight failed]
expected: FAIL
[cors-preflight-redirect.any.sharedworker.html]
expected: ERROR

View file

@ -1,68 +1,21 @@
[cors-preflight-referrer.any.worker.html]
type: testharness
[Referrer policy: no-referrer and referrer: default]
expected: FAIL
[Referrer policy: no-referrer and referrer: 'myreferrer']
expected: FAIL
[Referrer policy: "" and referrer: default]
expected: FAIL
[Referrer policy: "" and referrer: 'myreferrer']
expected: FAIL
[Referrer policy: origin and referrer: default]
expected: FAIL
[Referrer policy: origin and referrer: 'myreferrer']
expected: FAIL
[Referrer policy: origin-when-cross-origin and referrer: default]
expected: FAIL
[Referrer policy: origin-when-cross-origin and referrer: 'myreferrer']
expected: FAIL
[Referrer policy: unsafe-url and referrer: default]
expected: FAIL
[Referrer policy: unsafe-url and referrer: 'myreferrer']
expected: FAIL
[cors-preflight-referrer]
expected: FAIL
[cors-preflight-referrer.any.html]
type: testharness
[Referrer policy: no-referrer and referrer: default]
expected: FAIL
[Referrer policy: no-referrer and referrer: 'myreferrer']
expected: FAIL
[Referrer policy: "" and referrer: default]
expected: FAIL
[Referrer policy: "" and referrer: 'myreferrer']
expected: FAIL
[Referrer policy: origin and referrer: default]
expected: FAIL
[Referrer policy: origin and referrer: 'myreferrer']
expected: FAIL
[Referrer policy: origin-when-cross-origin and referrer: default]
expected: FAIL
[Referrer policy: origin-when-cross-origin and referrer: 'myreferrer']
expected: FAIL
[Referrer policy: unsafe-url and referrer: default]
expected: FAIL
[Referrer policy: unsafe-url and referrer: 'myreferrer']
expected: FAIL

View file

@ -1,38 +0,0 @@
[cors-preflight-star.any.html]
type: testharness
[CORS that succeeds with credentials: false; method: OK (allowed: *); header: X-Test,1 (allowed: *)]
expected: FAIL
[CORS that succeeds with credentials: true; method: PUT (allowed: PUT); header: (allowed: *)]
expected: FAIL
[CORS that succeeds with credentials: true; method: * (allowed: *); header: *,1 (allowed: *)]
expected: FAIL
[CORS that succeeds with credentials: false; method: GET (allowed: get); header: X-Test,1 (allowed: x-test)]
expected: FAIL
[CORS that succeeds with credentials: false; method: SUPER (allowed: *); header: X-Test,1 (allowed: x-test)]
expected: FAIL
[cors-preflight-star.any.worker.html]
type: testharness
[CORS that succeeds with credentials: false; method: OK (allowed: *); header: X-Test,1 (allowed: *)]
expected: FAIL
[CORS that succeeds with credentials: true; method: PUT (allowed: PUT); header: (allowed: *)]
expected: FAIL
[CORS that succeeds with credentials: true; method: * (allowed: *); header: *,1 (allowed: *)]
expected: FAIL
[cors-preflight-star]
expected: FAIL
[CORS that succeeds with credentials: false; method: GET (allowed: get); header: X-Test,1 (allowed: x-test)]
expected: FAIL
[CORS that succeeds with credentials: false; method: SUPER (allowed: *); header: X-Test,1 (allowed: x-test)]
expected: FAIL

View file

@ -1,50 +0,0 @@
[cors-preflight-status.any.html]
type: testharness
[Preflight answered with status 200]
expected: FAIL
[Preflight answered with status 201]
expected: FAIL
[Preflight answered with status 202]
expected: FAIL
[Preflight answered with status 203]
expected: FAIL
[Preflight answered with status 204]
expected: FAIL
[Preflight answered with status 205]
expected: FAIL
[Preflight answered with status 206]
expected: FAIL
[cors-preflight-status.any.worker.html]
type: testharness
[Preflight answered with status 200]
expected: FAIL
[Preflight answered with status 201]
expected: FAIL
[Preflight answered with status 202]
expected: FAIL
[Preflight answered with status 203]
expected: FAIL
[Preflight answered with status 204]
expected: FAIL
[Preflight answered with status 205]
expected: FAIL
[Preflight answered with status 206]
expected: FAIL
[cors-preflight-status]
expected: FAIL

View file

@ -6,27 +6,6 @@
[CORS [PUT\] [several headers\], server allows]
expected: FAIL
[CORS [PUT\], server allows]
expected: FAIL
[CORS [GET\] [x-test-header: allowed\], server allows]
expected: FAIL
[CORS [PUT\], server allows, check preflight has user agent]
expected: FAIL
[CORS [DELETE\], server allows]
expected: FAIL
[CORS [PUT\] [only safe headers\], server allows]
expected: FAIL
[CORS [NEW\], server allows]
expected: FAIL
[CORS [PATCH\], server allows]
expected: FAIL
[cors-preflight.any.worker.html]
type: testharness
@ -39,24 +18,3 @@
[cors-preflight]
expected: FAIL
[CORS [PUT\], server allows]
expected: FAIL
[CORS [GET\] [x-test-header: allowed\], server allows]
expected: FAIL
[CORS [PUT\], server allows, check preflight has user agent]
expected: FAIL
[CORS [DELETE\], server allows]
expected: FAIL
[CORS [PUT\] [only safe headers\], server allows]
expected: FAIL
[CORS [NEW\], server allows]
expected: FAIL
[CORS [PATCH\], server allows]
expected: FAIL

View file

@ -1,96 +0,0 @@
[cors-redirect-preflight.any.worker.html]
[cors-redirect-preflight]
expected: FAIL
[Redirect 302: same origin to cors (preflight after redirection success case)]
expected: FAIL
[Redirect 303: cors to same origin (preflight after redirection success case)]
expected: FAIL
[Redirect 302: cors to another cors (preflight after redirection success case)]
expected: FAIL
[Redirect 308: same origin to cors (preflight after redirection success case)]
expected: FAIL
[Redirect 302: cors to same origin (preflight after redirection success case)]
expected: FAIL
[Redirect 301: same origin to cors (preflight after redirection success case)]
expected: FAIL
[Redirect 307: cors to another cors (preflight after redirection success case)]
expected: FAIL
[Redirect 301: cors to another cors (preflight after redirection success case)]
expected: FAIL
[Redirect 307: same origin to cors (preflight after redirection success case)]
expected: FAIL
[Redirect 308: cors to same origin (preflight after redirection success case)]
expected: FAIL
[Redirect 303: cors to another cors (preflight after redirection success case)]
expected: FAIL
[Redirect 307: cors to same origin (preflight after redirection success case)]
expected: FAIL
[Redirect 301: cors to same origin (preflight after redirection success case)]
expected: FAIL
[Redirect 303: same origin to cors (preflight after redirection success case)]
expected: FAIL
[Redirect 308: cors to another cors (preflight after redirection success case)]
expected: FAIL
[cors-redirect-preflight.any.html]
[Redirect 302: same origin to cors (preflight after redirection success case)]
expected: FAIL
[Redirect 303: cors to same origin (preflight after redirection success case)]
expected: FAIL
[Redirect 302: cors to another cors (preflight after redirection success case)]
expected: FAIL
[Redirect 308: same origin to cors (preflight after redirection success case)]
expected: FAIL
[Redirect 302: cors to same origin (preflight after redirection success case)]
expected: FAIL
[Redirect 301: same origin to cors (preflight after redirection success case)]
expected: FAIL
[Redirect 307: cors to another cors (preflight after redirection success case)]
expected: FAIL
[Redirect 301: cors to another cors (preflight after redirection success case)]
expected: FAIL
[Redirect 307: same origin to cors (preflight after redirection success case)]
expected: FAIL
[Redirect 308: cors to same origin (preflight after redirection success case)]
expected: FAIL
[Redirect 303: cors to another cors (preflight after redirection success case)]
expected: FAIL
[Redirect 307: cors to same origin (preflight after redirection success case)]
expected: FAIL
[Redirect 301: cors to same origin (preflight after redirection success case)]
expected: FAIL
[Redirect 303: same origin to cors (preflight after redirection success case)]
expected: FAIL
[Redirect 308: cors to another cors (preflight after redirection success case)]
expected: FAIL