Unwrap unnecessary bytes.NewReader
This commit is contained in:
@ -1011,11 +1011,7 @@ func (s *Server) getHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
|
|
||||||
if disposition == "inline" && strings.Contains(contentType, "html") {
|
if disposition == "inline" && strings.Contains(contentType, "html") {
|
||||||
reader = ioutil.NopCloser(
|
reader = ioutil.NopCloser(bluemonday.UGCPolicy().SanitizeReader(reader))
|
||||||
bytes.NewReader(
|
|
||||||
bluemonday.UGCPolicy().
|
|
||||||
SanitizeReader(reader).
|
|
||||||
Bytes()))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if w.Header().Get("Range") == "" {
|
if w.Header().Get("Range") == "" {
|
||||||
|
Reference in New Issue
Block a user