Ignore data links
This commit is contained in:
parent
d5c85c16b9
commit
307e311b61
@ -78,6 +78,7 @@ type client struct {
|
|||||||
//
|
//
|
||||||
// Some schemas automatically return success:
|
// Some schemas automatically return success:
|
||||||
// - mailto
|
// - mailto
|
||||||
|
// - data
|
||||||
func NewClient(opts *ClientOpts) Client {
|
func NewClient(opts *ClientOpts) Client {
|
||||||
return &client{*opts.withDefaults()}
|
return &client{*opts.withDefaults()}
|
||||||
}
|
}
|
||||||
@ -261,7 +262,7 @@ func (c *client) get(
|
|||||||
return c.getGemini(ctx, url, redirectDepth)
|
return c.getGemini(ctx, url, redirectDepth)
|
||||||
case "http", "https":
|
case "http", "https":
|
||||||
return c.getHTTP(ctx, url, redirectDepth)
|
return c.getHTTP(ctx, url, redirectDepth)
|
||||||
case "mailto":
|
case "mailto", "data":
|
||||||
return c.noOpGet()
|
return c.noOpGet()
|
||||||
default:
|
default:
|
||||||
return "", nil, fmt.Errorf("unsupported scheme %q", scheme)
|
return "", nil, fmt.Errorf("unsupported scheme %q", scheme)
|
||||||
|
Loading…
Reference in New Issue
Block a user