From 91564f7fbcc6ffc68cd9bd69347d1621d5689d8b Mon Sep 17 00:00:00 2001 From: Rafael Gonzaga Date: Thu, 8 Sep 2022 13:47:21 -0300 Subject: [PATCH] test: remove assert to invalid HTTP version (#4260) --- test/unsupported-httpversion.test.js | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/test/unsupported-httpversion.test.js b/test/unsupported-httpversion.test.js index 9a984c5133..ef93fef7d4 100644 --- a/test/unsupported-httpversion.test.js +++ b/test/unsupported-httpversion.test.js @@ -4,32 +4,6 @@ const net = require('net') const t = require('tap') const Fastify = require('../fastify') -t.test('Will return 505 HTTP error if HTTP version (default) is not supported', t => { - const fastify = Fastify() - - t.teardown(fastify.close.bind(fastify)) - - fastify.get('/', (req, reply) => { - reply.send({ hello: 'world' }) - }) - - fastify.listen({ port: 0 }, err => { - t.error(err) - - const port = fastify.server.address().port - const client = net.createConnection({ port }, () => { - client.write('GET / HTTP/5.1\r\n\r\n') - - client.once('data', data => { - t.match(data.toString(), /505 HTTP Version Not Supported/i) - client.end(() => { - t.end() - }) - }) - }) - }) -}) - t.test('Will return 505 HTTP error if HTTP version (2.0 when server is 1.1) is not supported', t => { const fastify = Fastify()