mirror of
https://github.com/tenox7/wrp.git
synced 2024-12-21 15:29:21 +00:00
dynamically present content type
This commit is contained in:
parent
91870f5724
commit
0e3192b69f
2
txt.go
2
txt.go
@ -169,7 +169,7 @@ func imgServerZ(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
imgStor.del(id)
|
||||
w.Header().Set("Content-Type", "image/gif")
|
||||
w.Header().Set("Content-Type", http.DetectContentType(img))
|
||||
w.Header().Set("Content-Length", strconv.Itoa(len(img)))
|
||||
w.Write(img)
|
||||
w.(http.Flusher).Flush()
|
||||
|
Loading…
Reference in New Issue
Block a user