Skip to content

Commit 8a1c0b9

Browse files
committed
Tests: removed forbidden header js tests.
1 parent 212d9d0 commit 8a1c0b9

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

js_fetch_objects.t

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -158,27 +158,6 @@ $t->write_file('test.js', <<EOF);
158158
['invalid header value', () => {
159159
var h = new Headers({A: 'aa\x00a'});
160160
}, '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'],
182161
['combine', () => {
183162
var h = new Headers({a: 'X', A: 'Z'});
184163
return h.get('a');
@@ -326,24 +305,6 @@ $t->write_file('test.js', <<EOF);
326305
327306
return 'OK';
328307
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-
347308
}, 'OK'],
348309
['method', () => {
349310
const methods = ['get', 'hEad', 'Post', 'OPTIONS', 'PUT',

0 commit comments

Comments
 (0)