-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix: Adjust POST headers and review Transfer-Encoding handling in forward-auth #11023
Conversation
|
t/plugin/forward-auth.t
Outdated
@@ -488,3 +488,127 @@ Authorization: 333 | |||
} | |||
} | |||
--- error_code: 200 | |||
|
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.
Three blanks are needed between test cases
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.
Three blanks are needed between test cases
Ok, I will fix that.
@shreemaan-abhishek Using client_body_reader by default is a more efficient method for handling large request bodies, as it prevents the entire large request body from being loaded into memory all at once. However, if the majority of the request bodies are small, frequently using streaming read can lead to unnecessary performance overheads, because each read operation requires time and resources, even if the data volume is small. Therefore, a more balanced approach might be to select the appropriate reading strategy based on the anticipated size and usage of the request body. For example, a threshold could be set: use core.request.get_body() for request bodies smaller than this threshold, and use httpc:get_client_body_reader() for request bodies larger than the threshold. |
@motongxue okay, it makes sense to me now. |
@motongxue test cases are failing. |
I will update soon. |
…ward-auth
Description
This is regarding the problem mentioned in Case 2 of issue #10927. I addressed the issue by retrieving the maximum body size using ngx.var.client_max_body_size and then comparing it with the Content-Length.
As a newcomer to APISIX, I have drafted the logic for the test case as I think it should be, but I would appreciate assistance in reviewing the correctness of the test case writing.
Fixes # (issue)
Checklist