Closed suikabreaker closed 2 years ago
@zhuizhuhaomeng May you review this PR?
And there is a small doubt on my own: what is the scenario for the use of the function of preserving the request body here, and is it common enough?
And there is a small doubt on my own: what is the scenario for the use of the function of preserving the request body here, and is it common enough?
There is. I have been working on a WAF project, which acts as a proxy filtering request body. It needs to pass the body(and if we can, do not modify the body) if there's no attempt of attack found.
The document of the
preserve
option is also needed.Note that it should be stated that if the
preserve
option is turned on, the memory usage is doubled.
Seems other two options are also not documented. Added description.
@suikabreaker there's still typo: warpped -> wrapped.
@suikabreaker there's still typo: warpped -> wrapped.
Fixed.
The other part looks good to me.
The other part looks good to me.
I have re-requested review.
could you help check this PR? ping @zhuizhuhaomeng @doujiang24
Fix #41 and #42. Inspired from this PR: #43.
My goal is to leave the request body unchanged after "regeneration" and decouple the implementation of #61 from this, so I implement this in another way and try to make fewer modifications to the original logic.