mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-11-23 12:40: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") {
|
||||
reader = ioutil.NopCloser(
|
||||
bytes.NewReader(
|
||||
bluemonday.UGCPolicy().
|
||||
SanitizeReader(reader).
|
||||
Bytes()))
|
||||
reader = ioutil.NopCloser(bluemonday.UGCPolicy().SanitizeReader(reader))
|
||||
}
|
||||
|
||||
if w.Header().Get("Range") == "" {
|
||||
|
|
Loading…
Reference in a new issue