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

Cannot read a request stream more than once #1

Open
drewhemm opened this issue Jan 27, 2021 · 0 comments
Open

Cannot read a request stream more than once #1

drewhemm opened this issue Jan 27, 2021 · 0 comments

Comments

@drewhemm
Copy link

logRequest(r)

admissionReview, err := parseBody(r)

Only the first read works, the second one returns empty as the stream has already been processed. See this post on Reddit:

https://www.reddit.com/r/golang/comments/8mfex0/why_requestbody_is_empty_after_decoding_or_reading/

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

No branches or pull requests

1 participant