mirror of
https://github.com/element-hq/synapse
synced 2024-10-01 07:32:41 +00:00
Log method and path when dropping request due to size limit (#10091)
This commit is contained in:
parent
84cf3e47a0
commit
1641c5c707
2 changed files with 4 additions and 1 deletions
1
changelog.d/10091.misc
Normal file
1
changelog.d/10091.misc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Log method and path when dropping request due to size limit.
|
|
@ -105,8 +105,10 @@ class SynapseRequest(Request):
|
||||||
assert self.content, "handleContentChunk() called before gotLength()"
|
assert self.content, "handleContentChunk() called before gotLength()"
|
||||||
if self.content.tell() + len(data) > self._max_request_body_size:
|
if self.content.tell() + len(data) > self._max_request_body_size:
|
||||||
logger.warning(
|
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.client,
|
||||||
|
self.get_method(),
|
||||||
|
self.get_redacted_uri(),
|
||||||
)
|
)
|
||||||
self.transport.abortConnection()
|
self.transport.abortConnection()
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue