feature: preserve body after parse#63
Conversation
read_body_part handles the garbage part.
|
@zhuizhuhaomeng May you review this PR? |
xiaocang
left a comment
There was a problem hiding this comment.
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.
|
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? |
Co-authored-by: Johnny Wang <wangjiahao@openresty.com>
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. |
Seems other two options are also not documented. Added description. |
|
@suikabreaker there's still typo: warpped -> wrapped. |
Fixed. |
|
The other part looks good to me. |
I have re-requested review. |
|
could you help check this PR? |
Co-authored-by: lijunlong <lijunlong@openresty.com>
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.