Commit Graph

57 Commits

Author SHA1 Message Date
Behouba Manassé 9937c05bea
Pass cfg by reference around the codebase (#819)
* Pass cfg by reference around the codebase

* Merge branch 'master' into pass-cfg-by-ref

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2020-02-11 11:18:12 +00:00
Brendan Abolivier af9568ba44 Fix /send_join and /send_leave (#821)
Fix the /send_join and /send_leave endpoints, so that they use the v2 endpoints as mandated by MSC1802. Also comment out the SyTest tests that are failing because of lack of support for the v1 endpoints.
2019-12-20 14:41:32 +00:00
Neil Alexander b4d638cd04
Return server names (#833)
* Remove unnecessary map->array processing

* Return server names in room federation directory query

* Knock off a TODO
2019-12-20 13:24:57 +00:00
Alex Chen a81917c3e7
Make trailing slash on server key request optional (#788)
Cherry-picked from 7e861b60fbd721b374ec929926b14e57dc60ec41
2019-08-20 01:01:53 +08:00
Andrew Morgan e56d6e41fd 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.
2019-07-18 15:41:29 +08:00
Andrew Morgan 33a1392541
Encode URLs properly (#728)
We were escaping the URL before performing any pattern matching on it.
This meant that if you sent data that URLdecoded to a "/", it would count as
a "/" in the URL, potentially causing a 404. This was causing some flaky tests
with some randomly-generated query parameters.

Now, we keep URLs encoded while doing the pattern matching, and only afterwards
do we URL decode each query parameter individually before passing them to their
respective handler functions.

github.com/gorilla/mux was also updated to v1.7.3 to fix a bug with URL encoding and subrouters.
2019-07-03 16:38:50 +01:00
ruben 74827428bd use go module for dependencies (#594) 2019-05-21 21:56:55 +01:00