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>
This commit is contained in:
Furqan Shaikh 2018-12-31 23:07:11 +05:30 committed by Daniel Bevenius
parent 5717dc2ae1
commit 076d8b9f9d

View File

@ -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(() => {