Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support MSC3916 by adding
_matrix/client/v1/media/download
endpoint #17365Support MSC3916 by adding
_matrix/client/v1/media/download
endpoint #17365Changes from 1 commit
402f67d
f6db449
c3b25c0
fca35c8
814727a
2b77d39
5fcc81a
a86d448
196335c
b2a7a9c
151cc5d
358e793
af86135
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at
read_multipart_response
, it looks like it errs at > only?https://github.com/H-Shay/hq_synapse/blob/5fcc81ade3e9afdab89c0da0aa77bf44304fd8de/synapse/http/client.py#L1237-L1240
Or do you mean buried in
_MultipartParserProtocol
's parent,protocol.Protocol
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It actually was referring to what happens in the
_MultipartParserProtocol
'sdataRecieved
function: https://github.com/H-Shay/hq_synapse/blob/5fcc81ade3e9afdab89c0da0aa77bf44304fd8de/synapse/http/client.py#L1109So the check in
read_multipart_response
checks that the response length provided by the remote server is not greater than the max length, and in thedataRecieved
function it checks that the actual data coming in over the wire doesn't exceed that (insurance against faulty/malicious response length data). Erring at >= is modeled after what happens in_ReadBodyWithMaxSizeProtocol
:synapse/synapse/http/client.py
Line 1037 in b11f5c9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, I see. Could you just add a pointer to that function to make this comment clearer?