From e56d6e41fdb1cc86ffcfdb2a2812d66b98662a1a Mon Sep 17 00:00:00 2001 From: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Date: Thu, 18 Jul 2019 08:41:29 +0100 Subject: [PATCH] Remove the trailing slash from /send/{txnID} and /backfill/{roomID} (#746) In conjunction with matrix-org/sytest#651, /send/{txnID} and /backfill/{roomID} should not have trailing slashes according to the spec. --- federationapi/routing/routing.go | 4 ++-- testfile | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/federationapi/routing/routing.go b/federationapi/routing/routing.go index 16704e0b2..ed32c8904 100644 --- a/federationapi/routing/routing.go +++ b/federationapi/routing/routing.go @@ -65,7 +65,7 @@ func Setup( v2keysmux.Handle("/server/{keyID}", localKeys).Methods(http.MethodGet) v2keysmux.Handle("/server/", localKeys).Methods(http.MethodGet) - v1fedmux.Handle("/send/{txnID}/", common.MakeFedAPI( + v1fedmux.Handle("/send/{txnID}", common.MakeFedAPI( "federation_send", cfg.Matrix.ServerName, keys, func(httpReq *http.Request, request *gomatrixserverlib.FederationRequest) util.JSONResponse { vars, err := common.URLDecodeMapValues(mux.Vars(httpReq)) @@ -260,7 +260,7 @@ func Setup( }, )).Methods(http.MethodPost) - v1fedmux.Handle("/backfill/{roomID}/", common.MakeFedAPI( + v1fedmux.Handle("/backfill/{roomID}", common.MakeFedAPI( "federation_backfill", cfg.Matrix.ServerName, keys, func(httpReq *http.Request, request *gomatrixserverlib.FederationRequest) util.JSONResponse { vars, err := common.URLDecodeMapValues(mux.Vars(httpReq)) diff --git a/testfile b/testfile index bdd421e2d..8a8225a83 100644 --- a/testfile +++ b/testfile @@ -147,3 +147,5 @@ Inbound federation can receive room-join requests Typing events appear in initial sync Typing events appear in incremental sync Typing events appear in gapped sync +Inbound federation of state requires event_id as a mandatory paramater +Inbound federation of state_ids requires event_id as a mandatory paramater