Remove content disposition header from httputil.WriteSSZ (#15092)

* remove content disposition header from httputil.WriteSSZ

* fix changelog

* fix newly added calls to WriteSSZ
This commit is contained in:
Bastin
2025-03-26 15:17:19 +01:00
committed by GitHub
parent 6a27c41aad
commit 1295c987e8
8 changed files with 27 additions and 25 deletions

View File

@@ -40,10 +40,9 @@ func WriteJson(w http.ResponseWriter, v any) {
}
// WriteSsz writes the response message in ssz format
func WriteSsz(w http.ResponseWriter, respSsz []byte, fileName string) {
func WriteSsz(w http.ResponseWriter, respSsz []byte) {
w.Header().Set("Content-Length", strconv.Itoa(len(respSsz)))
w.Header().Set("Content-Type", api.OctetStreamMediaType)
w.Header().Set("Content-Disposition", "attachment; filename="+fileName)
if _, err := io.Copy(w, io.NopCloser(bytes.NewReader(respSsz))); err != nil {
log.WithError(err).Error("could not write response message")
}