Add Content-Type: text/plain header to custom transports' error responses

This commit is contained in:
DarthSim
2025-03-23 18:41:41 +03:00
parent 10285240a9
commit ca18921c13
5 changed files with 19 additions and 20 deletions

View File

@@ -122,7 +122,7 @@ func respNotFound(req *http.Request, msg string) *http.Response {
Proto: "HTTP/1.0",
ProtoMajor: 1,
ProtoMinor: 0,
Header: make(http.Header),
Header: http.Header{"Content-Type": {"text/plain"}},
ContentLength: int64(len(msg)),
Body: io.NopCloser(strings.NewReader(msg)),
Close: false,