Header before body write #7

Merged
techknowlogick merged 1 commits from techknowlogick-patch-1 into master 2020-08-25 16:10:10 +00:00

View File

@ -240,10 +240,10 @@ func Captchaer(options ...Options) macaron.Handler {
}
}
ctx.Status(200)
if _, err := NewImage([]byte(chars), cpt.StdWidth, cpt.StdHeight, cpt.ColorPalette).WriteTo(ctx.Resp); err != nil {
panic(fmt.Errorf("write captcha: %v", err))
}
ctx.Status(200)
return
}