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

Trailing slashes required on some federation endpoints #3622

Closed
1 of 8 tasks
turt2live opened this issue Jul 27, 2018 · 5 comments
Closed
1 of 8 tasks

Trailing slashes required on some federation endpoints #3622

turt2live opened this issue Jul 27, 2018 · 5 comments
Assignees
Labels
z-minor (Deprecated Label)

Comments

@turt2live
Copy link
Member

turt2live commented Jul 27, 2018

  • PUT /send/$txnId
  • GET /pull Unused endpoint
  • GET /event/$eventId
  • GET /state/$context
  • GET /state_ids/$roomId
  • GET /backfill/$context
  • GET /groups/$groupId/roles
  • GET /groups/$groupdId/categories
@turt2live turt2live changed the title Federation GET /event/$whatever is unrecognized, but /event/$whatever/ is fine Trailing slashes required on some federation endpoints Jul 31, 2018
@neilisfragile neilisfragile added z-p2 (Deprecated Label) z-minor (Deprecated Label) labels Aug 28, 2018
@neilisfragile neilisfragile added r0 P2 and removed z-p2 (Deprecated Label) labels Jan 8, 2019
@neilisfragile neilisfragile added v1.0 and removed r0 P2 labels Feb 28, 2019
@neilisfragile
Copy link
Contributor

Proposed implementation is for Synapse to be permissive in what it accepts, ensure that its own requests are spec compliant but if the remote end rejects, then retry on the alternative form.

@anoadragon453
Copy link
Member

anoadragon453 commented Mar 1, 2019

So what do people think about removing the [^/]* at the end of every servlet's PATH variable and instead consolidating it all into BaseFederationServlet, which'll just stick a [^/]* at the end of the path, where [^/]* means 0 or more /s that doesn't count as part of the pattern.

@anoadragon453
Copy link
Member

Sytest is going to need some changes as well in terms of what it expects (/ vs no /).

anoadragon453 added a commit that referenced this issue Mar 11, 2019
anoadragon453 added a commit that referenced this issue Mar 21, 2019
…n 400 (#4840)

As per #3622, we remove trailing slashes from outbound federation requests. However, to ensure that we remain backwards compatible with previous versions of Synapse, if we receive a HTTP 400 with `M_UNRECOGNIZED`, then we are likely talking to an older version of Synapse in which case we retry with a trailing slash appended to the request path.
@richvdh
Copy link
Member

richvdh commented Mar 25, 2019

reopening this because #4793 got reverted

@anoadragon453
Copy link
Member

Done in #4935

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
z-minor (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

4 participants