Test that the image URL's host is one spelling (part of #246)
The image URL parser must lower-case the host and refuse one holding "@", which a URL reads as a user name and password before the host; ErrInvalidHost is added for that refusal. A host with a port, or a ":" with no port, must match no allowlist entry, so its request needs a signature. All three tests fail until the fix. Model: opus-5-5
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
var (
|
||||
ErrInvalidPath = errors.New("invalid image path")
|
||||
ErrMissingHost = errors.New("missing source host")
|
||||
ErrInvalidHost = errors.New("invalid source host")
|
||||
ErrMissingSize = errors.New("missing size specification")
|
||||
ErrInvalidSize = errors.New("invalid size format")
|
||||
ErrInvalidFormat = errors.New("invalid or unsupported format")
|
||||
|
||||
Reference in New Issue
Block a user