Skip to content
This repository was archived by the owner on Mar 5, 2024. It is now read-only.

Commit e9b0d43

Browse files
committed
explicitly unset the Content-Type header
1 parent 34bcb13 commit e9b0d43

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sequins.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ func (s *sequins) ServeHTTP(w http.ResponseWriter, r *http.Request) {
152152
log.Fatal(fmt.Errorf("Error fetching value for %s: %s", key, err))
153153
w.WriteHeader(http.StatusInternalServerError)
154154
} else {
155+
// Explicitly unset Content-Type, so ServeContent doesn't try to do any
156+
// sniffing.
157+
w.Header()["Content-Type"] = nil
158+
155159
http.ServeContent(w, r, key, s.updated, bytes.NewReader(res))
156160
}
157161
}

0 commit comments

Comments
 (0)