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

chore: refactor process body related logs and doc #1187

Merged
merged 4 commits into from
Nov 2, 2024
Merged

Conversation

M4tteoP
Copy link
Member

@M4tteoP M4tteoP commented Oct 31, 2024

When the body limit action is ProcessPartial and the limit is reached, the body process is automatically called. Calling it again was leading to the following warning message:

[WARN] ProcessRequestBody should have already been called tx_id="uDPSANFxsXfdivXtYCT"

In coraza-proxy-wasm there is a check based on the written bytes and expected to be written bytes to check if the process actually happened, but I feel it is hacky and not always possible (with other writers we might don't know the size of body we are going to write). This PR fixes it moving this case into just a Debug log, taking into consideration that another call to ProcessBody might still happen.

@M4tteoP M4tteoP requested a review from a team as a code owner October 31, 2024 21:06
@M4tteoP M4tteoP merged commit 643c29f into main Nov 2, 2024
6 checks passed
@M4tteoP M4tteoP deleted the process_body branch November 2, 2024 09:56
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.

2 participants