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

bug: graphql post request route matching exception #10197

Closed
AlinsRan opened this issue Sep 14, 2023 · 0 comments · Fixed by #10198
Closed

bug: graphql post request route matching exception #10197

AlinsRan opened this issue Sep 14, 2023 · 0 comments · Fixed by #10198

Comments

@AlinsRan
Copy link
Contributor

Current Behavior

Graphql post requests have a probability of causing routing matching exception.

The larger the body, the greater the probability of routing exceptions, which may be affected by other requests in the final result.

Expected Behavior

No response

Error Logs

No response

Steps to Reproduce

  1. apisix configure config.yaml
deployment:
  role: data_plane
  role_data_plane:
    config_provider: yaml

apisix:
  router:
    http: radixtree_uri

nginx_config:
  worker_processes: 1
  1. apisix.yaml configure
routes:
 - uri: "/hello"
   hosts:
     - test.com
   vars:
     - - "graphql_name"
       - "=="
       - "createAccount"
   priority: 30
   id: "graphql1"
   upstream_id: "invalid"

 - uri: "/hello"
   hosts:
     - test.com
   plugins:
     echo:
       body: "test server\n"
   priority: 20
   id: "graphql2"
   upstream_id: "invalid"
 
 - uri: "/hello"
   hosts:
     - test2.com
   plugins:
     echo:
       body: "test2\n"
   priority: 20
   id: "graphql3"
   upstream_id: "invalid"

upstreams:
 - nodes:
     127.0.0.1:1999: 1
   id: "invalid"
   ```
   
3. request params

```shell
➜  apisix git:(master) ✗ curl -Z http://test.com:9080/hello -H "Content-Type: application/json" -X POST -d @schema.json -Z http://test2.com:9080/hello
test2
test2
➜  apisix git:(master) ✗ curl -Z http://test.com:9080/hello -H "Content-Type: application/json" -X POST -d @schema.json -Z http://test2.com:9080/hello
test2
test server
➜  apisix git:(master) ✗ curl -Z http://test.com:9080/hello -H "Content-Type: application/json" -X POST -d @schema.json -Z http://test2.com:9080/hello
test2
test2
➜  apisix git:(master) ✗ curl -Z http://test.com:9080/hello -H "Content-Type: application/json" -X POST -d @schema.json -Z http://test2.com:9080/hello
test2
test2

Environment

  • APISIX version (run apisix version): master/3.5.0
  • Operating system (run uname -a):
  • OpenResty / Nginx version (run openresty -V or nginx -V):
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
  • APISIX Dashboard version, if relevant:
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant