don't let the image be cached (#1167)

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6593 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2008-01-12 02:27:29 +00:00
1 parent 411958ed40
commit fdc824ac5e
1 file changed
+1
@@ -120,6 +120,7 @@ public abstract class SecurityRealm implements Describable<SecurityRealm>, Exten
public final void doCaptcha(StaplerRequest req, StaplerResponse rsp) throws IOException {
String id = req.getSession().getId();
rsp.setContentType("image/png");
rsp.addHeader("Cache-Control","no-cache");
ImageIO.write( CaptchaService.INSTANCE.getImageChallengeForID(id), "PNG", rsp.getOutputStream() );
}