-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RFC: Return an instance of
*fiber.Error
when no handler found (#1847)
* 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>
- Loading branch information
Showing
4 changed files
with
9 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e974c67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
2
.Benchmark_Router_Chain
471.9
ns/op 40 B/op 2 allocs/op202
ns/op 0 B/op 0 allocs/op2.34
Benchmark_Router_WithCompression
469.4
ns/op 40 B/op 2 allocs/op200.3
ns/op 0 B/op 0 allocs/op2.34
This comment was automatically generated by workflow using github-action-benchmark.