From 4f8b8a746c195578b638957f0dd7d70c03cbb903 Mon Sep 17 00:00:00 2001 From: Mohit Kumar Patel <85980940+mohit1523@users.noreply.github.com> Date: Sun, 20 Aug 2023 03:12:59 +0530 Subject: [PATCH] Switch to ordered list for server name resolution steps (#1623) * Update server-server-api.md I have updated the list of Resolving server names in step 3 from unordered list to ordered list. Because we care about its order * Create 1567.clarification * Delete 1567.clarification * Create 1623.clarification * Update 1623.clarification --- changelogs/server_server/newsfragments/1623.clarification | 1 + content/server-server-api.md | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 changelogs/server_server/newsfragments/1623.clarification diff --git a/changelogs/server_server/newsfragments/1623.clarification b/changelogs/server_server/newsfragments/1623.clarification new file mode 100644 index 00000000..eab6c384 --- /dev/null +++ b/changelogs/server_server/newsfragments/1623.clarification @@ -0,0 +1 @@ +Switch to ordered list for server name resolution steps. diff --git a/content/server-server-api.md b/content/server-server-api.md index c2b31118..d0167e01 100644 --- a/content/server-server-api.md +++ b/content/server-server-api.md @@ -135,20 +135,20 @@ to send. The process overall is as follows: to step 4. If the response is valid, the `m.server` property is parsed as `[:]` and processed as follows: - - If `` is an IP literal, then that IP address + 1. If `` is an IP literal, then that IP address should be used together with the `` or 8448 if no port is provided. The target server must present a valid TLS certificate for the IP address. Requests must be made with a `Host` header containing the IP address, including the port if one was provided. - - If `` is not an IP literal, and + 2. If `` is not an IP literal, and `` is present, an IP address is discovered by looking up CNAME, AAAA or A records for ``. The resulting IP address is used, alongside the ``. Requests must be made with a `Host` header of `:`. The target server must present a valid certificate for ``. - - If `` is not an IP literal and no + 3. If `` is not an IP literal and no `` is present, an SRV record is looked up for `_matrix._tcp.`. This may result in another hostname (to be resolved using AAAA or A records) and port. @@ -156,7 +156,7 @@ to send. The process overall is as follows: a `Host` header containing the ``. The target server must present a valid certificate for ``. - - If no SRV record is found, an IP address is resolved using CNAME, AAAA + 4. If no SRV record is found, an IP address is resolved using CNAME, AAAA or A records. Requests are then made to the resolve IP address and a port of 8448, using a `Host` header of ``. The target server must present a valid