-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Closed
Copy link
Description
Bug Description
I registered a GET route and expected HEAD to work as well, but received a 405 error.
How to Reproduce
See code example
Expected Behavior
expected HEAD work as well when GET registered
Fiber Version
v3.0.0-rc.2
Code Snippet (optional)
package main
import (
"github.com/gofiber/fiber/v3"
)
func main() {
f := fiber.New(fiber.Config{})
f.Get("/", func(ctx fiber.Ctx) error {
return ctx.SendString("Hello, World!")
})
f.Listen(":3000")
}
curl -X HEAD -I http://127.0.0.1:3000 - HTTP/1.1 405 Method Not Allowed
curl -X GET -I http://127.0.0.1:3000 - HTTP/1.1 200 OKChecklist:
- I agree to follow Fiber's Code of Conduct.
- I have checked for existing issues that describe my problem prior to opening this one.
- I understand that improperly formatted bug reports may be closed without explanation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Type
Projects
Status
Done