Tests for #88, before the change: the format chosen for each Accept header (AVIF-capable, WebP-only, neither, wildcard only, absent, q=0 on AVIF, malformed), both image routes serving an auto URL in the chosen format with Vary: Accept, also on HEAD and 304, the signature covering auto rather than the chosen format, each chosen format cached apart, and Vary: Accept next to the CORS middleware's Vary: Origin. They do not compile yet: FormatAuto and formatForAccept do not exist. Model: opus-5-5
This commit is contained in:
@@ -95,6 +95,14 @@ func TestParseImageURL(t *testing.T) {
|
||||
Size: Size{Width: 200, Height: 200}, Format: FormatGIF,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "auto format",
|
||||
input: "/v1/image/example.com/photo.jpg/200x200.auto",
|
||||
want: &ParsedURL{
|
||||
Host: testHostExample, Path: "/photo.jpg",
|
||||
Size: Size{Width: 200, Height: 200}, Format: FormatAuto,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
|
||||
Reference in New Issue
Block a user