mirror of
https://github.com/nodejs/node.git
synced 2025-08-16 06:08:50 +02:00
deps: update llhttp to 9.2.0
PR-URL: https://github.com/nodejs/node/pull/51719 Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
This commit is contained in:
parent
84de97a61e
commit
25a6fb6a07
6 changed files with 607 additions and 546 deletions
|
@ -28,14 +28,14 @@ const httpServer = http.createServer(common.mustNotCall());
|
|||
|
||||
httpServer.once('clientError', common.mustCall((err, socket) => {
|
||||
assert.strictEqual(err.code, 'HPE_INVALID_METHOD');
|
||||
assert.strictEqual(err.rawPacket.toString(), 'Q');
|
||||
assert.strictEqual(err.rawPacket.toString(), '1');
|
||||
socket.destroy();
|
||||
|
||||
httpServer.once('clientError', common.mustCall((err) => {
|
||||
assert.strictEqual(err.code, 'HPE_INVALID_METHOD');
|
||||
assert.strictEqual(
|
||||
err.rawPacket.toString(),
|
||||
'WE http://example.com HTTP/1.1\r\n\r\n'
|
||||
'23 http://example.com HTTP/1.1\r\n\r\n'
|
||||
);
|
||||
}));
|
||||
}));
|
||||
|
@ -44,7 +44,11 @@ netServer.listen(0, common.mustCall(() => {
|
|||
const socket = net.createConnection(netServer.address().port);
|
||||
|
||||
socket.on('connect', common.mustCall(() => {
|
||||
socket.end('QWE http://example.com HTTP/1.1\r\n\r\n');
|
||||
// Note: do not use letters here for the method.
|
||||
// There is a very small chance that a method with that initial
|
||||
// might be added in the future and thus this test might fail.
|
||||
// Numbers will likely never have this issue.
|
||||
socket.end('123 http://example.com HTTP/1.1\r\n\r\n');
|
||||
}));
|
||||
|
||||
socket.on('close', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue