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

fix: graphql post request route matching exception #10198

Merged
merged 6 commits into from
Sep 14, 2023

Conversation

AlinsRan
Copy link
Contributor

@AlinsRan AlinsRan commented Sep 14, 2023

Description

Reuse of match_opts causes the value of the next request to overwrite the value of the current request. GraphQL requests call the ngx.req.read_body API, which is a non-blocking call. If the request body has not been fully read (for example, if the body size exceeds the nginx buffer), the coroutine will yield. If there are other requests during this time period, match_opts will be contaminated by other requests, resulting in matching the wrong route.

Fixes: #10197

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@AlinsRan AlinsRan marked this pull request as ready for review September 14, 2023 01:18
@monkeyDluffy6017 monkeyDluffy6017 merged commit ca80873 into apache:master Sep 14, 2023
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: graphql post request route matching exception
3 participants