From 307e311b617763f86f7b544281b1b9a7a772b213 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Sat, 30 Dec 2023 12:24:53 +0100 Subject: [PATCH] Ignore data links --- client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client.go b/client.go index 0833753..f8f35e6 100644 --- a/client.go +++ b/client.go @@ -78,6 +78,7 @@ type client struct { // // Some schemas automatically return success: // - mailto +// - data func NewClient(opts *ClientOpts) Client { return &client{*opts.withDefaults()} } @@ -261,7 +262,7 @@ func (c *client) get( return c.getGemini(ctx, url, redirectDepth) case "http", "https": return c.getHTTP(ctx, url, redirectDepth) - case "mailto": + case "mailto", "data": return c.noOpGet() default: return "", nil, fmt.Errorf("unsupported scheme %q", scheme)