fix: Adjust POST headers and review Transfer-Encoding handling in forward-auth#11023
fix: Adjust POST headers and review Transfer-Encoding handling in forward-auth#11023walter-mo wants to merge 0 commit into
Conversation
|
| } | ||
| } | ||
| --- error_code: 200 | ||
|
|
There was a problem hiding this comment.
Three blanks are needed between test cases
There was a problem hiding this comment.
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