Support TIFF images.

This commit is contained in:
Michael Carey 2017-08-31 13:04:10 -07:00
parent 4533f0c68a
commit c1a9dab401
3 changed files with 4 additions and 3 deletions

View file

@ -323,7 +323,7 @@ func (t *TransformingTransport) RoundTrip(req *http.Request) (*http.Response, er
resp.Header.WriteSubset(buf, map[string]bool{
"Content-Length": true,
// exclude Content-Type header if the format may have changed during transformation
"Content-Type": opt.Format != "" || resp.Header.Get("Content-Type") == "image/webp",
"Content-Type": opt.Format != "" || resp.Header.Get("Content-Type") == "image/webp" || resp.Header.Get("Content-Type") == "image/tiff",
})
fmt.Fprintf(buf, "Content-Length: %d\n\n", len(img))
buf.Write(img)