synapse/tests/http
Richard van der Hoff d840019192
Fix idna and ipv6 literal handling in MatrixFederationAgent (#4487)
Turns out that the library does a better job of parsing URIs than our
reinvented wheel. Who knew.

There are two things going on here. The first is that, unlike
parse_server_name, URI.fromBytes will strip off square brackets from IPv6
literals, which means that it is valid input to ClientTLSOptionsFactory and
HostnameEndpoint.

The second is that we stay in `bytes` throughout (except for the argument to
ClientTLSOptionsFactory), which avoids the weirdness of (sometimes) ending up
with idna-encoded values being held in `unicode` variables. TBH it probably
would have been ok but it made the tests fragile.
2019-01-28 09:56:59 +00:00
..
federation Fix idna and ipv6 literal handling in MatrixFederationAgent (#4487) 2019-01-28 09:56:59 +00:00
__init__.py Reject invalid server names (#3480) 2018-07-03 14:36:14 +01:00
test_endpoint.py Run black. 2018-08-10 23:54:09 +10:00
test_fedclient.py Fix Host header sent by MatrixFederationAgent (#4468) 2019-01-25 12:38:16 +00:00