-
-
Notifications
You must be signed in to change notification settings - Fork 135
PathNotFound error when trying to validate request with query parameter #242
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
Comments
I did some deeper research and it seems that issue is with
However, solution is to use
at the beginning of |
Please see #233 which probably fixes your issue. |
Nice, thank you very much! This PR fixes all of my issues, even one that I have not reported (related to draining stream data from the original Falcon's request object). Really appreciate prompt feedback and quick fixes! Btw, when new version will be released? |
@stojan-jovic I am not a developer on this project, just hit the same issue in my own work and submitted a patch. I hope it will be considered for merge soon. |
Found very strange bug, which is pretty critical for our work process, as it fully blocking endpoint validation (have no workaround for now).
I'm working with Falcon middleware at low level, but issue can be easy reproduced with even simpler example. I will provide most minimal working example that can be used for reproducing issue.
Falcon app (everything in single module, ugly, but only for testing purposes):
Swagger spec file content (
swagger.yml
):When I try to make simple
GET
request:Getting following error:
Strange thing is that if I have some path parameter in request, query parameter being properly validated, for example
GET
request:Request passing and returning result:
If we send the same requests without query parameters, everything working fine:
Here there is stack trace for the same error (from my app, generated by my low-level middleware logic:):
I did some very quick debugging and found pretty strange behavior of
PathFinder
'sfind
method (where error is raised), for example, request that has path parameter and being properly validated, looks like follows when parsed:Which does not looks to me as expected behavior and leads me to conclusion that it being validated with lucky circumstances.
My environment:
Not checked is this behavior the same with some other framework (Flask, Django), but I would say that this issue probably is not dependent on used framework. However, on the other side, it's strange that nobody found it till now?! Or I'm doing something wrong?
If there is no plans to debug this and provide fix, I would be happy to help with one PR with fix, if you can confirm that this is really bug and give me short directions where to look first!?
The text was updated successfully, but these errors were encountered: