Add content-type to API responses

This commit is contained in:
Alexey Khit
2023-05-28 06:37:59 +03:00
parent 1612f9c81e
commit 0e270081fe
7 changed files with 42 additions and 27 deletions
+2 -3
View File
@@ -3,6 +3,7 @@ package debug
import (
"bytes"
"fmt"
"github.com/AlexxIT/go2rtc/internal/api"
"net/http"
"runtime"
)
@@ -51,7 +52,5 @@ func stackHandler(w http.ResponseWriter, r *http.Request) {
"Total: %d, Skipped: %d", runtime.NumGoroutine(), skipped),
)
if _, err := w.Write(buf[:i]); err != nil {
panic(err)
}
api.ResponseText(w, buf[:i])
}