forked from tangled.org/core
Monorepo for Tangled — https://tangled.org

appview,hook,knotserver: set charset=utf-8 for all text/plain responses

Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.sh>

anirudh.fi 7cf6a47c 2762da91

verified
Changed files
+4 -4
appview
pulls
repo
hook
knotserver
+1 -1
appview/pulls/pulls.go
···
}
}
-
w.Header().Set("Content-Type", "text/plain")
+
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
w.Write([]byte(pull.Submissions[roundIdInt].Patch))
}
+1 -1
appview/repo/repo.go
···
return
}
-
w.Header().Set("Content-Type", "text/plain")
+
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
w.Write([]byte(result.Contents))
return
}
+1 -1
hook/hook.go
···
return fmt.Errorf("failed to create request: %w", err)
}
-
req.Header.Set("Content-Type", "text/plain")
+
req.Header.Set("Content-Type", "text/plain; charset=utf-8")
req.Header.Set("X-Git-Dir", gitDir)
req.Header.Set("X-Git-User-Did", userDid)
req.Header.Set("X-Git-User-Handle", userHandle)
+1 -1
knotserver/handler.go
···
}
}
-
w.Header().Set("Content-Type", "text/plain")
+
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
fmt.Fprintf(w, "knotserver/%s", version)
}