chore(gateway): document encoding fix

This commit is contained in:
Steven Allen 2019-11-06 11:47:27 +00:00
parent 69f6e08d9d
commit 7ae6f6fa3e

View File

@ -395,6 +395,10 @@ func (i *gatewayHandler) serveFile(w http.ResponseWriter, req *http.Request, nam
return
}
}
// Strip the encoding from the HTML Content-Type header and let the
// browser figure it out.
//
// Fixes https://github.com/ipfs/go-ipfs/issues/2203
if strings.HasPrefix(ctype, "text/html;") {
ctype = "text/html"
}