mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-15 05:32:25 +03:00
Update version of gomatrixserverlib (#111)
This commit is contained in:
parent
9d4d18ae7f
commit
aa179d451c
24 changed files with 2363 additions and 20 deletions
|
@ -40,8 +40,16 @@ type UserInfo struct {
|
|||
|
||||
// NewClient makes a new Client
|
||||
func NewClient() *Client {
|
||||
return &Client{client: http.Client{Transport: newFederationTripper()}}
|
||||
}
|
||||
|
||||
type federationTripper struct {
|
||||
transport http.RoundTripper
|
||||
}
|
||||
|
||||
func newFederationTripper() *federationTripper {
|
||||
// TODO: Verify ceritificates
|
||||
tripper := federationTripper{
|
||||
return &federationTripper{
|
||||
transport: &http.Transport{
|
||||
// Set our own DialTLS function to avoid the default net/http SNI.
|
||||
// By default net/http and crypto/tls set the SNI to the target host.
|
||||
|
@ -66,14 +74,6 @@ func NewClient() *Client {
|
|||
},
|
||||
},
|
||||
}
|
||||
|
||||
return &Client{
|
||||
client: http.Client{Transport: &tripper},
|
||||
}
|
||||
}
|
||||
|
||||
type federationTripper struct {
|
||||
transport http.RoundTripper
|
||||
}
|
||||
|
||||
func makeHTTPSURL(u *url.URL, addr string) (httpsURL url.URL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue