From 2936958b894a536d2299e2814ff851e931235ece Mon Sep 17 00:00:00 2001 From: Furqan Shaikh Date: Mon, 31 Dec 2018 23:07:11 +0530 Subject: [PATCH] test: http2 origin length ERR_HTTP2_ORIGIN_LENGTH PR-URL: https://github.com/nodejs/node/pull/25296 Reviewed-By: James M Snell Reviewed-By: Anto Aravinth Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig --- test/parallel/test-http2-origin.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/parallel/test-http2-origin.js b/test/parallel/test-http2-origin.js index 6312d1f00649f0..b06d371e29f36d 100644 --- a/test/parallel/test-http2-origin.js +++ b/test/parallel/test-http2-origin.js @@ -70,6 +70,14 @@ const ca = readKey('fake-startcom-root-cert.pem', 'binary'); } ); }); + const longInput = 'http://foo.bar' + 'a'.repeat(16383); + throws( + () => session.origin(longInput), + { + code: 'ERR_HTTP2_ORIGIN_LENGTH', + name: 'TypeError [ERR_HTTP2_ORIGIN_LENGTH]' + } + ); })); server.listen(0, mustCall(() => {