Clarify that base_url in client well_known may or may not include trailing slash (#3562)

Fixes #3465. The change adds a line explicitly warning developers that the base_url of client well_known may or may not include a trailing slash and to be prepared to handle both cases.
This commit is contained in:
Shay 2021-12-23 02:12:25 -08:00 committed by GitHub
parent 71ff06fd7a
commit 87fcb7c8b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -0,0 +1 @@
Clarify that `base_url` in client `well_known` may or may not include trailing slash.

View file

@ -297,6 +297,8 @@ specify parameter values. The flow for this method is as follows:
done as a simple check against configuration errors, in done as a simple check against configuration errors, in
order to ensure that the discovered address points to a order to ensure that the discovered address points to a
valid homeserver. valid homeserver.
3. It is important to note that the `base_url` value might include
a trailing `/`. Consumers should be prepared to handle both cases.
6. If the `m.identity_server` property is present, extract the 6. If the `m.identity_server` property is present, extract the
`base_url` value for use as the base URL of the identity server. `base_url` value for use as the base URL of the identity server.
Validation for this URL is done as in the step above, but using Validation for this URL is done as in the step above, but using