From a808b4692656c10bb43e2d54a2f5ef2746d231d5 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Wed, 1 Nov 2023 16:17:41 -0600 Subject: allow titan uploads in the meta-client fixes #18 --- client.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'client.go') diff --git a/client.go b/client.go index 26fed10..de8aed5 100644 --- a/client.go +++ b/client.go @@ -40,11 +40,13 @@ func NewClient(tlsConf *tls.Config) Client { if tlsConf != nil { hc.tp.TLSClientConfig = tlsConf } + gemcl := gemini.NewClient(tlsConf) return Client{ protos: map[string]protocolClient{ "finger": finger.Client{}, "gopher": gopher.Client{}, - "gemini": gemini.NewClient(tlsConf), + "gemini": gemcl, + "titan": gemcl, "spartan": spartan.NewClient(), "http": hc, "https": hc, @@ -95,7 +97,7 @@ func (c Client) Fetch(url string) (*Response, error) { } // Upload sends a request with a body and returns any redirect response. -func (c Client) Upload(url string, contents *io.LimitedReader) (*Response, error) { +func (c Client) Upload(url string, contents io.Reader) (*Response, error) { u, err := neturl.Parse(url) if err != nil { return nil, err -- cgit v1.2.3