mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-15 20:00:14 -04:00
Merge remote-tracking branch 'upstream/release-v1.40'
This commit is contained in:
commit
7359964d9f
124 changed files with 3989 additions and 904 deletions
|
@ -848,7 +848,7 @@ class _ReadBodyWithMaxSizeProtocol(protocol.Protocol):
|
|||
|
||||
def read_body_with_max_size(
|
||||
response: IResponse, stream: ByteWriteable, max_size: Optional[int]
|
||||
) -> defer.Deferred:
|
||||
) -> "defer.Deferred[int]":
|
||||
"""
|
||||
Read a HTTP response body to a file-object. Optionally enforcing a maximum file size.
|
||||
|
||||
|
@ -863,7 +863,7 @@ def read_body_with_max_size(
|
|||
Returns:
|
||||
A Deferred which resolves to the length of the read body.
|
||||
"""
|
||||
d = defer.Deferred()
|
||||
d: "defer.Deferred[int]" = defer.Deferred()
|
||||
|
||||
# If the Content-Length header gives a size larger than the maximum allowed
|
||||
# size, do not bother downloading the body.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue