Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Don't print HTTPStatus.* in "Processed..." logs
Browse files Browse the repository at this point in the history
Fixes #11812. See also #7118 and
#7188 (comment) in
particular.
  • Loading branch information
David Robertson committed Jan 25, 2022
1 parent 6911604 commit d2c4650
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion synapse/http/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,10 @@ def _finished_processing(self) -> None:

user_agent = get_request_user_agent(self, "-")

code = str(self.code)
# int(self.code) looks redundant, because self.code is already an int.
# But self.code might be an HTTPStatus (which inherits from int)---which has
# a different string representation. So ensure we really have an integer.
code = str(int(self.code))
if not self.finished:
# we didn't send the full response before we gave up (presumably because
# the connection dropped)
Expand Down

0 comments on commit d2c4650

Please sign in to comment.