mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-11-27 06:30:19 +01:00
Unwrap unnecessary bytes.NewReader
This commit is contained in:
parent
a90d29700d
commit
69519d8fa4
1 changed files with 1 additions and 5 deletions
|
@ -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") == "" {
|
||||||
|
|
Loading…
Reference in a new issue