summaryrefslogtreecommitdiff
path: root/test/parallel/test-http2-origin.js
diff options
context:
space:
mode:
authorFurqan Shaikh <furqan_shaikh_1999@hotmail.com>2018-12-31 23:07:11 +0530
committerDaniel Bevenius <daniel.bevenius@gmail.com>2019-01-07 08:49:05 +0100
commit076d8b9f9da195fd3ff1d8cadeac0605cbd91d7b (patch)
tree52f605693844dde7145991b40729f3da44906368 /test/parallel/test-http2-origin.js
parent5717dc2ae151ef8d0e02fb5afb6f26fb6d487dd8 (diff)
downloadandroid-node-v8-076d8b9f9da195fd3ff1d8cadeac0605cbd91d7b.tar.gz
android-node-v8-076d8b9f9da195fd3ff1d8cadeac0605cbd91d7b.tar.bz2
android-node-v8-076d8b9f9da195fd3ff1d8cadeac0605cbd91d7b.zip
test: http2 origin length ERR_HTTP2_ORIGIN_LENGTH
PR-URL: https://github.com/nodejs/node/pull/25296 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test/parallel/test-http2-origin.js')
-rw-r--r--test/parallel/test-http2-origin.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/parallel/test-http2-origin.js b/test/parallel/test-http2-origin.js
index 6312d1f006..b06d371e29 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(() => {