mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
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:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user