Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/hooks.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ test('Should not hijack reply for a normal http request in the internal onError
const httpClient = net.createConnection({ port }, () => {
t.teardown(httpClient.destroy.bind(httpClient))

httpClient.write('GET / HTTP/1.1\r\n\r\n')
httpClient.write('GET / HTTP/1.1\r\nHOST: localhost\r\n\r\n')
httpClient.once('data', data => {
t.match(data.toString(), /Fail/i)
})
Expand Down Expand Up @@ -352,7 +352,7 @@ test('Should not hijack reply for an normal request to a websocket route that is

const httpClient = net.createConnection({ port }, () => {
t.teardown(httpClient.destroy.bind(httpClient))
httpClient.write('GET /echo HTTP/1.1\r\n\r\n')
httpClient.write('GET /echo HTTP/1.1\r\nHOST: localhost\r\n\r\n')
httpClient.once('data', data => {
t.match(data.toString(), /not found/i)
})
Expand Down
2 changes: 1 addition & 1 deletion test/router.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ test('Should invoke the correct handler depending on the headers', t => {
const port = fastify.server.address().port

const httpClient = net.createConnection({ port }, () => {
httpClient.write('GET / HTTP/1.1\r\n\r\n')
httpClient.write('GET / HTTP/1.1\r\nHOST: localhost\r\n\r\n')
httpClient.once('data', data => {
t.match(data.toString(), /hi from handler/i)
httpClient.end()
Expand Down