Casey Smith uploaded a change:
https://go-review.googlesource.com/15990
net: added tiff file type to sniffSignatures in sniff.go
The current implementation of DetectContentType()
returns 'application/octet-stream' as the mime type for tiff images.
The byte signatures for tiff images have been added so the proper mime type
can be returned.
Change-Id: I2b0ab800f6f1d29d1db0df05d833ae140ad2a9d3
---
M src/net/http/sniff.go
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/net/http/sniff.go b/src/net/http/sniff.go
index 3602969..c430b8f 100644
--- a/src/net/http/sniff.go
+++ b/src/net/http/sniff.go
@@ -84,6 +84,8 @@
&exactSig{[]byte("GIF89a"), "image/gif"},
&exactSig{[]byte("\x89\x50\x4E\x47\x0D\x0A\x1A\x0A"), "image/png"},
&exactSig{[]byte("\xFF\xD8\xFF"), "image/jpeg"},
+ &exactSig{[]byte("\x49\x49\x2A\x00"), "image/tiff"},
+ &exactSig{[]byte("\x4D\x4D\x00\x2A"), "image/tiff"},
&exactSig{[]byte("BM"), "image/bmp"},
&maskedSig{
mask: []byte("\xFF\xFF\xFF\xFF\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF"),
--
https://go-review.googlesource.com/15990