Skip to content
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

feat: add request size limit plugin #528

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LeBW
Copy link
Contributor

@LeBW LeBW commented Sep 15, 2023

Ⅰ. Describe what this PR did

add request size limit plugin

Ⅱ. Does this pull request fix one issue?

#392

Ⅲ. Why don't you add test cases (unit test/integration test)?

this is a wasm plugin.

Ⅳ. Describe how to verify it

Use the plugin with README in the plugin directory.

Ⅴ. Special notes for reviews

@LeBW LeBW requested a review from johnlanni as a code owner September 15, 2023 02:35
@CLAassistant
Copy link

CLAassistant commented Sep 15, 2023

CLA assistant check
All committers have signed the CLA.

return nil
}

func onHttpRequestBody(ctx wrapper.HttpContext, config RequestSizeLimitConfig, body []byte, log wrapper.Log) types.Action {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这样实现是有问题的,这里只能拿到第一段body的length,要实现这个功能需要sdk支持流式处理body,这个还需要改进下才能支持,我先把PR标记为draft了

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这样实现是有问题的,这里只能拿到第一段body的length,要实现这个功能需要sdk支持流式处理body,这个还需要改进下才能支持,我先把PR标记为draft了

了解了,sdk支持流式处理body目前有排期计划支持吗?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johnlanni johnlanni marked this pull request as draft September 22, 2023 07:59
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.

3 participants