Update version of gomatrixserverlib (#111)

This commit is contained in:
Mark Haines 2017-05-19 10:46:17 +01:00 committed by GitHub
parent 9d4d18ae7f
commit aa179d451c
24 changed files with 2363 additions and 20 deletions

View file

@ -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) {