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: make a copy of response data in ResponseWriterInterceptor #89

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wardab0104
Copy link

@wardab0104 wardab0104 commented Feb 21, 2025

The data in ResponseWriterInterceptor will be changed from the beginning of the array, not replaced entirely, making the data not a valid json, it seems that the underlying array of the slice was changed somewhere
image

Debugging: (endpoint: /iam/v4/public/namespaces/{namespace}/users - PublicCreateUserV4)

  1. The data in ResponseWriterInterceptor is correct
    image
  2. The data when we get the response body
    image

After fix:
image

@Allen8975701
Copy link
Contributor

suggest to find the root cause. because this issue does not happen every time, if we must use this fix, this could affect the performance. wdyt? @wardab0104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants