Skip to content
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

trailing slash should not be required when using path matching in API profile #495

Closed
ahmadnassri opened this issue Aug 21, 2015 · 0 comments
Labels

Comments

@ahmadnassri
Copy link
Contributor

source: https://groups.google.com/d/msg/konglayer/3OyuLEbi_ao/PwkuJiXxEgAJ

curl -i -X POST --url http://localhost:8001/apis/ --data 'name=stockmarket' --data 'target_url=http://demo-streamdataio.rhcloud.com/' --data 'path=/stockmarket/prices'

When I curl with no query params, that's ok. I get my result. But if I curl with a query param, I've got an error:

curl -i -X GET --url "http://localhost:8000/stockmarket/prices?foo=bar" --header 'Host: demo-streamdataio.rhcloud.com'
HTTP/1.1 404 Not Found
Date: Fri, 21 Aug 2015 12:03:38 GMT
Content-Type: application/json; charset=utf-8
Connection: close
Server: kong/0.4.2
Via: kong/0.4.2

{"public_dns":["demo-streamdataio.rhcloud.com"],"message":"API not found with these values","path":"\/stockmarket\/prices?foo=bar"}

where this works fine:

curl -i -X GET --url "http://localhost:8000/stockmarket/prices/?toto=oto" --header 'Host: demo-streamdataio.rhcloud.com'
@thibaultcha thibaultcha removed their assignment Aug 21, 2015
thibaultcha added a commit that referenced this issue Aug 21, 2015
Use $uri instead of $request_uri to allow path matching even if
querystring parameters are present.

Fix #495
ctranxuan pushed a commit to streamdataio/kong that referenced this issue Aug 25, 2015
Use $uri instead of $request_uri to allow path matching even if
querystring parameters are present.

Fix Kong#495


Former-commit-id: b0db7a107c938f183ef43922e197336b98f1df16
tamizhgeek pushed a commit to ind9/kong that referenced this issue Aug 27, 2015
Use $uri instead of $request_uri to allow path matching even if
querystring parameters are present.

Fix Kong#495

Former-commit-id: b0db7a107c938f183ef43922e197336b98f1df16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants