Welcome to the Linux Foundation Forum!

Found a bug in Creating a Web Server with Fastify (7)

Posts: 58
edited November 2022 in LFW212 Class Forum

Within the handler function of fastify.setNotFoundHandler(), if the method of the request object is not 'GET', reply.status(404) is not called. It results that if I access a url of http://localhost:3000/foo, I will get 200 status code which is not the expected behavior.

Comments

  • Posts: 160

    @krave sorry having trouble understanding, can you maybe show a code snippet to elaborate?

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training