@@ -76,13 +76,22 @@ var HTTPRouteCORS = suite.ConformanceTest{
76
76
Namespace : "" ,
77
77
Response : http.Response {
78
78
StatusCodes : []int {200 , 204 },
79
- Headers : map [string ]string {
80
- "access-control-allow-origin" : "https://www.foo.com" ,
81
- "access-control-allow-methods" : "GET, OPTIONS" ,
82
- "access-control-allow-headers" : "x-header-1, x-header-2" ,
83
- "access-control-expose-headers" : "x-header-3, x-header-4" ,
84
- "access-control-max-age" : "3600" ,
85
- "access-control-allow-credentials" : "true" ,
79
+ HeadersWithMultipleValues : map [string ][]string {
80
+ "access-control-allow-origin" : {"https://www.foo.com" },
81
+ "access-control-allow-methods" : {
82
+ "GET, OPTIONS" ,
83
+ "OPTIONS, GET" ,
84
+ },
85
+ "access-control-allow-headers" : {
86
+ "x-header-1, x-header-2" ,
87
+ "x-header-2, x-header-1" ,
88
+ },
89
+ "access-control-expose-headers" : {
90
+ "x-header-3, x-header-4" ,
91
+ "x-header-4, x-header-3" ,
92
+ },
93
+ "access-control-max-age" : {"3600" },
94
+ "access-control-allow-credentials" : {"true" },
86
95
},
87
96
// Ignore whitespace when comparing the response headers. This is because some
88
97
// implementations add a space after each comma, and some don't. Both are valid.
@@ -114,14 +123,22 @@ var HTTPRouteCORS = suite.ConformanceTest{
114
123
},
115
124
Namespace : "" ,
116
125
Response : http.Response {
117
- StatusCodes : []int {200 , 204 },
118
- Headers : map [string ]string {
119
- "access-control-allow-origin" : "https://www.bar.com" ,
120
- "access-control-allow-methods" : "GET, OPTIONS" ,
121
- "access-control-allow-headers" : "x-header-1, x-header-2" ,
122
- "access-control-expose-headers" : "x-header-3, x-header-4" ,
123
- "access-control-max-age" : "3600" ,
124
- "access-control-allow-credentials" : "true" ,
126
+ StatusCode : 200 ,
127
+ HeadersWithMultipleValues : map [string ][]string {
128
+ "access-control-allow-origin" : {"https://www.bar.com" },
129
+ "access-control-allow-methods" : {
130
+ "GET, OPTIONS" ,
131
+ "OPTIONS, GET" },
132
+ "access-control-allow-headers" : {
133
+ "x-header-1, x-header-2" ,
134
+ "x-header-2, x-header-1" ,
135
+ },
136
+ "access-control-expose-headers" : {
137
+ "x-header-3, x-header-4" ,
138
+ "x-header-4, x-header-3" ,
139
+ },
140
+ "access-control-max-age" : {"3600" },
141
+ "access-control-allow-credentials" : {"true" },
125
142
},
126
143
// Ignore whitespace when comparing the response headers. This is because some
127
144
// implementations add a space after each comma, and some don't. Both are valid.
0 commit comments