From 119a8cf380d3d004ee391d0df321982f6ceb5740 Mon Sep 17 00:00:00 2001 From: awalol Date: Fri, 3 May 2024 16:17:32 +0800 Subject: [PATCH] fix: wrong png header --- internal/sniff/image.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/sniff/image.go b/internal/sniff/image.go index ed567a0..502961b 100644 --- a/internal/sniff/image.go +++ b/internal/sniff/image.go @@ -3,7 +3,7 @@ package sniff // ref: https://mimesniff.spec.whatwg.org var imageMIMEs = map[string]Sniffer{ "image/jpeg": prefixSniffer{0xFF, 0xD8, 0xFF}, - "image/png": prefixSniffer{'P', 'N', 'G', '\r', '\n', 0x1A, '\n'}, + "image/png": prefixSniffer{0x89, 'P', 'N', 'G', '\r', '\n', 0x1A, '\n'}, "image/bmp": prefixSniffer("BM"), "image/webp": prefixSniffer("RIFF"), "image/gif": prefixSniffer("GIF8"),