From 0c55de7fcc3241caf2a0fdf7187c865b94349e5b Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Mon, 5 Mar 2012 00:36:54 +0000
Subject: [PATCH]   * viewstat.jsp: Send Connection: Close to work around Jetty
 bug     http://jira.codehaus.org/browse/JETTY-1346

---
 apps/routerconsole/jsp/viewstat.jsp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/apps/routerconsole/jsp/viewstat.jsp b/apps/routerconsole/jsp/viewstat.jsp
index af7b2944cd..0a716cb9db 100644
--- a/apps/routerconsole/jsp/viewstat.jsp
+++ b/apps/routerconsole/jsp/viewstat.jsp
@@ -44,6 +44,10 @@ if ( !rendered && ((rs != null) || fakeBw) ) {
         response.setContentType("image/png");
         // very brief 45 sec expire
         response.setDateHeader("Expires", net.i2p.I2PAppContext.getGlobalContext().clock().now() + (45*1000));
+        // http://jira.codehaus.org/browse/JETTY-1346
+        // This doesn't actually appear in the response, but it fixes the problem,
+        // so Jetty must look for this header and close the connection.
+        response.setHeader("Connection", "Close");
         int width = -1;
         int height = -1;
         int periodCount = -1;
-- 
GitLab