-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Federation 'send_join' response has extraneous [200, $data] wrapping (SYN-490) #1383
Comments
Jira watchers: @leonerd |
As a solution: I imagine one of these wants removing, though this would change the on-the-wire- format of join messages. We'd have to first ensure that that the federation client can accept a response in either format (which should be a trivial test of the toplevel container type), and additionally publish some sort of announcement for developers of other homeservers to adapt it suitably. Or maybe ignore it for v1 and fix that in federation v2? -- @leonerd |
Conclusion: So much other stuff in federation needs fixing that we'll have to adopt a "v2" sometime anyway. So we'll just ignore this for now and treat it as a v1 quirk (much like HTTP 1.1's "referer" header) -- @leonerd |
Also the -- @leonerd |
For future adventurers: The PR that added this to the spec is here: matrix-org/matrix-spec-proposals#143 Worth noting is the fix is scheduled for v2 as per matrix-org/matrix-spec-proposals@f6c5597 |
well, I guess this is now baked into the spec, so is no longer a synapse bug, and is superceded by matrix-org/matrix-spec-proposals#1418. |
Hard to say if this is an impl. or a spec bug as the
make_join
/send_join
API is completely undocumented, so for now I'm reporting it as an impl bug.The JSON response body to a
send_join
request arrives with an extra layer of wrapping, being placed into a list with the number 200 in the first position and the actual event data in the second. I believe this comes from the implementation havingdefer.returnValue((200, content))
style code in it twice; once at
synapse/synapse/federation/federation_server.py
Line 250 in efeeff2
and once again at
synapse/synapse/federation/transport/server.py
Line 314 in efeeff2
(Imported from https://matrix.org/jira/browse/SYN-490)
(Reported by @leonerd)
The text was updated successfully, but these errors were encountered: