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

Log method and path when dropping request due to size limit #10091

Merged
merged 2 commits into from
May 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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