You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I did some review of the code and I noticed that as part of commit 9bfe9c9 , _log_request_body changed the test of the body from:
if request.body:
to
if self.cached_request_body is not None:
Which means that the code now logs empty request bodies.
Do you know if this change was intentional to actually log empty bodies or is it an oversight form the change to using cached_request_body rather than body?
If you agree that this was an unintended change, I'm happy to consider a fix and create a pull request for the change.
I did a small test changing the line from:
if self.cached_request_body is not None:
to
if self.cached_request_body:
And the behaviour now matches the one pre commit on 8/28/2020.
Let me know if I can help.
The text was updated successfully, but these errors were encountered:
We are users of this package, thank you, and we recently bumped to the latest version as part of a larger upgrade effort.
Everything still works well, however we noticed that we have a lot of log entries with and empty message, for HTTP requests with no body.
ERROR|P|2021-07-17 18:43:25,185|3698|140577588385536|31e1c60a-aad0-457b-a49c-2ac47661353f|middleware|log|b''
I did some review of the code and I noticed that as part of commit 9bfe9c9 , _log_request_body changed the test of the body from:
if request.body:
to
if self.cached_request_body is not None:
Which means that the code now logs empty request bodies.
Do you know if this change was intentional to actually log empty bodies or is it an oversight form the change to using cached_request_body rather than body?
If you agree that this was an unintended change, I'm happy to consider a fix and create a pull request for the change.
I did a small test changing the line from:
if self.cached_request_body is not None:
to
if self.cached_request_body:
And the behaviour now matches the one pre commit on 8/28/2020.
Let me know if I can help.
The text was updated successfully, but these errors were encountered: