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

Do not always set request.body to [REDACTED] if reading body is not possible #2006

Closed
gregkalapos opened this issue Feb 9, 2023 · 1 comment

Comments

@gregkalapos
Copy link
Contributor

Our doc for CaptureBody says:

If the request has a body and this setting is disabled, the body will be shown as [REDACTED].

However, here in the code we set the body to [REDACTED] always if we can't read the body. There are cases where based on the CaptureBody setting we'd read the body, but the agent is unable to do so. E.g. here.

So the situation is:

  • Request body is set to something other than 'off' and the body would be captured
  • Agent tries to capture it, but it fails to do so (e.g. due to buffering setting).

Current behaviour: we set body to [REDACTED] as if the setting would be off. This is confusing.

Expected behaviour: the body should remain empty. (Plus the agent print waring log already).

@redcinelli
Copy link
Contributor

Hi folks, I have been facing this exact issue today.

It is indeed very confusing.
Should we update the documentation ?

Should we fix this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants