* 🐛 bug: fix route naming issue when using same path for different methods
* fix linter
* add new testcase for HEAD route
* add comments to tests
* fix tests
* Bug fix: route names not updating
* fixed lint error
* updated tests with renaming edge case
* fix group naming partially
* add todo
* fix todo
* fix todo
---------
Co-authored-by: Muhammed Efe Çetin <efectn@protonmail.com>
* improve error handling for net error(s)
fixes: reverse proxy support #2419
* Update app.go
Co-authored-by: leonklingele <git@leonklingele.de>
* improve error handling for net error(s)
fixes: reverse proxy support #2419
* improve error handling for net error(s)
fixes: reverse proxy support #2419
* improve error handling for net error(s)
fixes: reverse proxy support #2419
---------
Co-authored-by: leonklingele <git@leonklingele.de>
* ✅ chore: add go 1.20 to ci and readmes
* 🧹 chore: add go 1.20 to ci and readmes
* update linter
* fix linter
* fix benchmarks
* fix benchmarks
* fix benchmarks
* golangci-lint: add and apply more stricter linting rules
* github: drop security workflow now that we use gosec linter inside golangci-lint
* github: use official golangci-lint CI linter
* Add editorconfig and gitattributes file
* 🐛 bug: fix mounting doesn't work if when to declare it before routes
* 🐛 bug: fix mounting doesn't work if when to declare it before routes
* 🐛 bug: fix mounting doesn't work if when to declare it before routes
* 🐛 bug: fix mounting doesn't work if when to declare it before routes
* 🐛 bug: fix mounting doesn't work if when to declare it before routes
* add onMount hooks, mountPath like express.js, better behavior for onName, onRoute, onGroup, onGroupName hooks on mounted apps
* add comment
* use once
* fix views when both app and sub-app have view engine, better behavior for mount path
* fix tests
* fix tests
* make some tasks
* make some tasks
* fix unhandled errors
* fix unhandled error in cache package test
* omit variable type
* omit variable type
* rename variable because collide with the imported package name
* handle file error on closing
* fix unhandled in common_linux.go
* fix unhandled errors in helpers_test.go
* fix unhandled errors in listen_test.go
* remove unused parameter in emptyHandler method
* refactor path.go
* unhandled error in hooks test
* fix unhandled errors in app_test.go
* fix unhandled errors in ctx_test.go
* ✨ fix unhandled errors in helpers_test.go
* revert app_test.go
* remove redundant parentheses and update comments
* update code comment for helping ide
* update code comment for helping ide
* fix unhandled error in app_test.go
* update code comments for helping IDEs
* fix unhandled errors in app_test.go
* update code comment for helping the IDEs
* fix unhandled errors
* fix unhandled error in cache package test
* omit variable type
* omit variable type
* rename variable because collide with the imported package name
* handle file error on closing
* fix unhandled in common_linux.go
* fix unhandled errors in helpers_test.go
* fix unhandled errors in listen_test.go
* remove unused parameter in emptyHandler method
* refactor path.go
* unhandled error in hooks test
* fix unhandled errors in app_test.go
* fix unhandled errors in ctx_test.go
* ✨ fix unhandled errors in helpers_test.go
* revert app_test.go
* remove redundant parentheses and update comments
* update code comment for helping ide
* update code comment for helping ide
* fix unhandled error in app_test.go
* update code comments for helping IDEs
* 🐛 bug: ClientHelloInfo support for app.Listener
* 🐛 bug: ClientHelloInfo support for app.Listener
* fix
* make tlshandler public
* update
* 🐛 bug: make tlsHandler public to use it with Listener #2034
Co-authored-by: wernerr <rene@gofiber.io>
* Fix padding around app name in startup message when it contains non-ascii characters
* fix conflict, allow ending space only for odd length strings
* move startup message tests to listen_test.go
* Return an instance of `*fiber.Error` when no handler found
When a handler cannot be found for a given path, previously Fiber
would construct a plaintext response that cannot be modified.
This commit switches to returning a new instance of `*fiber.Error`
with identical error message so that users can customise the look
of their 404 pages.
Signed-off-by: AKP <tom@tdpain.net>
* Fix `Test_App_Next_Method`
This test was failing as the error returned by `c.Next()` that's
required to generate the correct 404 status code was not being
passed through the middleware and being silently ignored.
Signed-off-by: AKP <tom@tdpain.net>
* Fix `Test_Logger_All`
Signed-off-by: AKP <tom@tdpain.net>
* Fix `Test_Cache_WithHeadThenGet` test
As far as I can tell, this test is meant to check that a cached
HEAD request to a given endpoint does not return the cached
content to a GET request to the same endpoint, and the test has
been altered to correctly check for this.
Signed-off-by: AKP <tom@tdpain.net>
* ✨feature: print all routes message when server starts
* ✨feature: print all routes message when server starts
* ✨feature: print all routes message when server starts
* 🐛fix: errors unhandled
* 🐛fix: ignore child process and add some "-" to the table head
* 🐛fix: add printRoutesMessage for listener and listenTLS
- Mounted fiber and its sub apps error handlers are now saved a new
errorHandlers map in App
- New public App.ErrorHandler method that wraps the logic for which
error handler to user on any given context
- Error handler match logic based on request path <=> prefix accuracy
- Typo fixes
- Tests