mirror of
https://github.com/tenox7/wrp.git
synced 2025-01-02 16:31:40 +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
|
return
|
||||||
}
|
}
|
||||||
imgStor.del(id)
|
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.Header().Set("Content-Length", strconv.Itoa(len(img)))
|
||||||
w.Write(img)
|
w.Write(img)
|
||||||
w.(http.Flusher).Flush()
|
w.(http.Flusher).Flush()
|
||||||
|
Loading…
Reference in New Issue
Block a user