mirror of https://github.com/agola-io/agola
log api: set http Content Type
set the Content-Type header to `text/plain;charset=UTF-8`
This commit is contained in:
parent
fcce8c7628
commit
f1b5688f49
|
|
@ -620,6 +620,7 @@ func (h *LogsHandler) do(w http.ResponseWriter, r *http.Request) error {
|
|||
// header also if there're currently no lines to send
|
||||
w.Header().Set("Cache-Control", "no-cache")
|
||||
w.Header().Set("Connection", "keep-alive")
|
||||
w.Header().Set("Content-Type", "text/plain;charset=UTF-8")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
var flusher http.Flusher
|
||||
if fl, ok := w.(http.Flusher); ok {
|
||||
|
|
|
|||
|
|
@ -255,6 +255,7 @@ func (h *LogsHandler) readTaskLogs(ctx context.Context, runID, taskID string, se
|
|||
// header also if there're currently no lines to send
|
||||
w.Header().Set("Cache-Control", "no-cache")
|
||||
w.Header().Set("Connection", "keep-alive")
|
||||
w.Header().Set("Content-Type", "text/plain;charset=UTF-8")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
var flusher http.Flusher
|
||||
if fl, ok := w.(http.Flusher); ok {
|
||||
|
|
|
|||
Loading…
Reference in New Issue