@@ -15,10 +15,8 @@ Feature: Server must implement the CORS protocol for simple requests
1515 When method <method>
1616 Then match <statuses> contains responseStatus
1717 And match header Access-Control-Allow-Origin == 'https://tester'
18- And match header Access-Control-Allow-Credentials == 'true'
1918 And match header Access-Control-Expose-Headers != null
2019 And match header Access-Control-Expose-Headers != '*'
21- And match header Vary contains 'Origin'
2220 Examples :
2321 | method | headers ! | body | statuses |
2422 | GET | {Accept : 'text /turtle '} | def ignore = 1 | [401 ] |
@@ -33,10 +31,8 @@ Feature: Server must implement the CORS protocol for simple requests
3331 When method <method>
3432 Then match <statuses> contains responseStatus
3533 And match header Access-Control-Allow-Origin == 'https://tester'
36- And match header Access-Control-Allow-Credentials == 'true'
3734 And match header Access-Control-Expose-Headers != null
3835 And match header Access-Control-Expose-Headers != '*'
39- And match header Vary contains 'Origin'
4036 Examples :
4137 | method | headers ! | body | statuses |
4238 | GET | {Accept : 'text /plain '} | def ignore = 1 | [401 ] |
@@ -51,15 +47,15 @@ Feature: Server must implement the CORS protocol for simple requests
5147 When method <method>
5248 Then match <statuses> contains responseStatus
5349 And match header Access-Control-Allow-Origin == 'https://tester'
54- And match header Access-Control-Allow-Credentials == 'true'
5550 And match header Access-Control-Expose-Headers != null
5651 And match header Access-Control-Expose-Headers != '*'
57- And match header Vary contains 'Origin'
52+ # Check Vary on GET/HEAD requests only
53+ And <checkVary>
5854 Examples :
59- | method | headers ! | body | statuses |
60- | GET | {Accept : 'text /turtle '} | def ignore = 1 | [200 ] |
61- | HEAD | {} | def ignore = 1 | [200 ] |
62- | POST | {'Content -Type ': 'text /plain '} | request "Hello " | [200 , 201 , 204 , 205 ] |
55+ | method | headers ! | body | statuses | checkVary |
56+ | GET | {Accept : 'text /turtle '} | def ignore = 1 | [200 ] | match header Vary contains ' Origin ' |
57+ | HEAD | {} | def ignore = 1 | [200 ] | match header Vary contains ' Origin ' |
58+ | POST | {'Content -Type ': 'text /plain '} | request "Hello " | [200 , 201 , 204 , 205 ] | def ignore = 1 |
6359
6460 Scenario Outline : Requests resource with credentials: <method> request returns access control headers
6561 Given url resource.url
@@ -70,7 +66,6 @@ Feature: Server must implement the CORS protocol for simple requests
7066 When method <method>
7167 Then match <statuses> contains responseStatus
7268 And match header Access-Control-Allow-Origin == 'https://tester'
73- And match header Access-Control-Allow-Credentials == 'true'
7469 And match header Access-Control-Expose-Headers != null
7570 And match header Access-Control-Expose-Headers != '*'
7671 And match header Vary contains 'Origin'
0 commit comments