Federation server resolution does not follow spec
For example, you try to resolve a SRV record first even if there is a delegated server port. The spec says that in this case you should use the delegated host and port directly. On the other hand, no SRV request is made at all if there is no
.well-known/matrix/server
Relevant spec section: Server-Server § 3.1