Improve handling of remote image/jpeg resources (#9278)

Add jpe, jif, and jfif to image/jpeg extensions.
For remote image/jpeg without extension, always use jpg extension.

Closes #9275
This commit is contained in:
Joe Mooring
2021-12-12 23:55:15 -08:00
committed by GitHub
parent 8a005538db
commit a037be774d
3 changed files with 16 additions and 11 deletions

View File

@@ -177,7 +177,7 @@ var (
// Common image types
PNGType = newMediaType("image", "png", []string{"png"})
JPEGType = newMediaType("image", "jpeg", []string{"jpg", "jpeg"})
JPEGType = newMediaType("image", "jpeg", []string{"jpg", "jpeg", "jpe", "jif", "jfif"})
GIFType = newMediaType("image", "gif", []string{"gif"})
TIFFType = newMediaType("image", "tiff", []string{"tif", "tiff"})
BMPType = newMediaType("image", "bmp", []string{"bmp"})