chore(gateway): document encoding fix
Steven Allen committed
Nov 6, 2019 at 11:47 UTC
7ae6f6fa3eaaa503049caa07508c44adfe33ff60
1 file changed
+4
core/corehttp/gateway_handler.go
+4
@@ -395,6 +395,10 @@ func (i *gatewayHandler) serveFile(w http.ResponseWriter, req *http.Request, nam
395
return
396
}
397
}
398
+ // Strip the encoding from the HTML Content-Type header and let the
399
+ // browser figure it out.
400
+ //
401
+ // Fixes https://github.com/ipfs/go-ipfs/issues/2203
402
if strings.HasPrefix(ctype, "text/html;") {
403
ctype = "text/html"
404
}