@@ -158,27 +158,6 @@ $t->write_file('test.js', <<EOF);
158
158
['invalid header value', () => {
159
159
var h = new Headers({A: 'aa\x00 a'});
160
160
}, 'invalid header value'],
161
- ['forbidden header', () => {
162
- const forbidden = ['Host', 'Connection', 'Content-length'];
163
- forbidden.forEach(fh => {
164
- var headers = {};
165
- headers[fh] = 'xxx';
166
- headers.foo = 'bar';
167
-
168
- var h = new Headers(headers);
169
- if (h.get(fh) != 'xxx') {
170
- throw new Error(`forbidden header \$ {fh}`);
171
- }
172
-
173
- if (h.get('foo') != 'bar') {
174
- throw new Error(
175
- `non forbidden header foo: \$ {h.get('foo')}`);
176
- }
177
- })
178
-
179
- return 'OK';
180
-
181
- }, 'OK'],
182
161
['combine', () => {
183
162
var h = new Headers({a: 'X', A: 'Z'});
184
163
return h.get('a');
@@ -326,24 +305,6 @@ $t->write_file('test.js', <<EOF);
326
305
327
306
return 'OK';
328
307
329
- }, 'OK'],
330
- ['forbidden request header', () => {
331
- const forbidden = ['Host', 'Connection', 'Content-length'];
332
- forbidden.forEach(fh => {
333
- var r = new Request("http://nginx.org",
334
- {headers: {[fh]: 'xxx', foo: 'bar'}});
335
- if (r.headers.get(fh) != null) {
336
- throw new Error(`forbidden header \$ {fh}`);
337
- }
338
-
339
- if (r.headers.get('foo') != 'bar') {
340
- throw new Error(
341
- `non forbidden header foo: \$ {r.headers.get('foo')}`);
342
- }
343
- })
344
-
345
- return 'OK';
346
-
347
308
}, 'OK'],
348
309
['method', () => {
349
310
const methods = ['get', 'hEad', 'Post', 'OPTIONS', 'PUT',
0 commit comments