diff --git a/nginx/t/js_fetch_objects.t b/nginx/t/js_fetch_objects.t index 1bc88a3d8..d98d59a07 100644 --- a/nginx/t/js_fetch_objects.t +++ b/nginx/t/js_fetch_objects.t @@ -139,30 +139,8 @@ $t->write_file('test.js', < { - const valid = "!#\$\%&'*+-.^_`|~0123456789"; - - for (var i = 0; i < 128; i++) { - var c = String.fromCodePoint(i); - - if (valid.indexOf(c) != -1 || /[a-zA-Z]+/.test(c)) { - continue; - } - - try { - new Headers([[c, 'a']]); - throw new Error( - `header with "\${c}" (\${i}) should throw`); - - } catch (e) { - if (e.message != 'invalid header name') { - throw e; - } - } - } - - return 'OK'; - - }, 'OK'], + var h = new Headers([[':', 'a']]); + }, 'invalid header name'], ['invalid header value', () => { var h = new Headers({A: 'aa\x00a'}); }, 'invalid header value'],