New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With RedirectFixedPath enabled, the request execution panics when a 404 is expected #2959
Comments
Also the Same Panic For Case-Insensitive Redirect.
This test case should be returned as
Environment
|
@appleboy , it looks like this issue is still happening on v1.9.0. You just need to add this test to reproduce (as I suggested on the bug report).
this is the result of that test
Will you reopen this or should I create a new one? |
krakend uses gin-gonic (v1.9.0?) and logs these errors:
Could these errors be related to this issue? |
maybe I mentioned the wrong person, in that case I'll try again because there has been a new release and this was not discussed: @thinkerou which one do you think is the best way to proceed? should I open a new issue or will you reopen this one? I'm sorry if I mentioned the wrong person again. I just want to be sure this is reaching the right people |
Description
When a request to a path doesn't match any registered patterns and the
RedirectFixedPath
flag is set to true, the request execution panics (invalid node type). This is the line throwing the panic: https://github.com/gin-gonic/gin/blob/v1.7.7/tree.go#L851If the panic is commented, everything seems to work as expected with the exception of the test
TestTreeInvalidNodeType
.How to reproduce
Add this function to the
gin_integration_test.go
fileExpectations
The router should return a 404
Actual result
The router panics and the client (curl) returns
Environment
The text was updated successfully, but these errors were encountered: