handlers.go. Now image is being returned by value.
This commit is contained in:
parent
f35c16f837
commit
f5ea776e87
@ -39,7 +39,7 @@ func (h *CaptchaHandlers) Image(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
w.Header().Add("Content-Disposition", "inline; filename=\""+string(captchaID)+"\"")
|
w.Header().Add("Content-Disposition", "inline; filename=\""+string(captchaID)+"\"")
|
||||||
|
|
||||||
png.Encode(w, *captchaImage)
|
png.Encode(w, captchaImage)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *CaptchaHandlers) Solve(w http.ResponseWriter, r *http.Request) {
|
func (h *CaptchaHandlers) Solve(w http.ResponseWriter, r *http.Request) {
|
||||||
|
Loading…
Reference in New Issue
Block a user