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

Commit

Permalink
Log method and path when dropping request due to size limit (#10091)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed May 28, 2021
1 parent 84cf3e4 commit 1641c5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/10091.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Log method and path when dropping request due to size limit.
4 changes: 3 additions & 1 deletion synapse/http/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@ def handleContentChunk(self, data):
assert self.content, "handleContentChunk() called before gotLength()"
if self.content.tell() + len(data) > self._max_request_body_size:
logger.warning(
"Aborting connection from %s because the request exceeds maximum size",
"Aborting connection from %s because the request exceeds maximum size: %s %s",
self.client,
self.get_method(),
self.get_redacted_uri(),
)
self.transport.abortConnection()
return
Expand Down

0 comments on commit 1641c5c

Please sign in to comment.