mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-21 07:54:12 -04:00
Fix Host header sent by MatrixFederationAgent (#4468)
Move the Host header logic down here so that (a) it is used if we reuse the agent elsewhere, and (b) we can mess about with it with .well-known.
This commit is contained in:
parent
0b3fd1401f
commit
8520bc3109
5 changed files with 28 additions and 2 deletions
|
@ -49,7 +49,6 @@ class FederationClientTests(HomeserverTestCase):
|
|||
return hs
|
||||
|
||||
def prepare(self, reactor, clock, homeserver):
|
||||
|
||||
self.cl = MatrixFederationHttpClient(self.hs)
|
||||
self.reactor.lookups["testserv"] = "1.2.3.4"
|
||||
|
||||
|
@ -95,6 +94,7 @@ class FederationClientTests(HomeserverTestCase):
|
|||
|
||||
# that should have made it send the request to the transport
|
||||
self.assertRegex(transport.value(), b"^GET /foo/bar")
|
||||
self.assertRegex(transport.value(), b"Host: testserv:8008")
|
||||
|
||||
# Deferred is still without a result
|
||||
self.assertNoResult(test_d)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue