Back out matrix-org/dendrite#2421 by restoring http.Clients

This creates problems with non-HTTPS endpoints and should fix #2444.
This commit is contained in:
Neil Alexander 2022-05-10 11:08:10 +01:00
parent 1b3fa9689c
commit 77722c5a4f
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
6 changed files with 44 additions and 33 deletions

View file

@ -231,7 +231,7 @@ func queryIDServerStoreInvite(
profile = &authtypes.Profile{}
}
client := gomatrixserverlib.NewClient()
client := http.Client{}
data := url.Values{}
data.Add("medium", body.Medium)
@ -253,7 +253,7 @@ func queryIDServerStoreInvite(
}
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
resp, err := client.DoHTTPRequest(ctx, req)
resp, err := client.Do(req.WithContext(ctx))
if err != nil {
return nil, err
}