Skip to content

Conversation

@suikabreaker
Copy link
Contributor

@suikabreaker suikabreaker commented Jan 12, 2022

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.

@suikabreaker
Copy link
Contributor Author

@zhuizhuhaomeng May you review this PR?

Copy link

@xiaocang xiaocang left a 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.

@xiaocang
Copy link

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>
@suikabreaker
Copy link
Contributor Author

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.

@suikabreaker suikabreaker requested a review from xiaocang March 23, 2022 06:08
@suikabreaker
Copy link
Contributor Author

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.

@xiaocang
Copy link

@suikabreaker there's still typo: warpped -> wrapped.

@suikabreaker
Copy link
Contributor Author

@suikabreaker there's still typo: warpped -> wrapped.

Fixed.

@xiaocang
Copy link

The other part looks good to me.

@suikabreaker suikabreaker requested a review from xiaocang March 24, 2022 09:48
@suikabreaker
Copy link
Contributor Author

The other part looks good to me.

I have re-requested review.

@xiaocang
Copy link

could you help check this PR?
ping @zhuizhuhaomeng @doujiang24

Co-authored-by: lijunlong <lijunlong@openresty.com>
@zhuizhuhaomeng zhuizhuhaomeng merged commit 73c8984 into openresty:master Mar 31, 2022
@xiaocang xiaocang mentioned this pull request Apr 7, 2022
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

Successfully merging this pull request may close these issues.

How to reconstruct body after upload

3 participants