Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
There are already multiple issues(#135 #152 #502) regarding reading request body or form data from original request multiple times. The default answer to that use case is implementing caching of
I think that having to implement body caching is error prone and not very trivial especially for novices in reactive, and since there were already a lot of questions regarding this issue maybe it makes sense to add such global filter into Gateway out of the box?
This might not be the most efficient, but other solutions I have tried using retain/slice along with discard seem to leak.
This appears pretty stable. We read the body into memory if it exists, and we decorate with a newly created buffer. If we retry/repeat. We will have an untouched buffer with a ref count of 1.