-
Notifications
You must be signed in to change notification settings - Fork 113
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
feature: preserve body after parse #63
feature: preserve body after parse #63
Conversation
read_body_part handles the garbage part.
@zhuizhuhaomeng May you review this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.