Author: nextgens
Date: 2007-11-03 18:06:59 +0000 (Sat, 03 Nov 2007)
New Revision: 15673

Modified:
   trunk/freenet/src/freenet/clients/http/StartupToadletServer.java
Log:
improve last commit

Modified: trunk/freenet/src/freenet/clients/http/StartupToadletServer.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/StartupToadletServer.java    
2007-11-03 17:55:37 UTC (rev 15672)
+++ trunk/freenet/src/freenet/clients/http/StartupToadletServer.java    
2007-11-03 18:06:59 UTC (rev 15673)
@@ -84,6 +84,9 @@

     private final Toadlet startupToadlet = new Toadlet(null) {
         public void handleGet(URI uri, HTTPRequest req, ToadletContext ctx) 
throws ToadletContextClosedException, IOException, RedirectException {
+           // If we don't disconnect we will have pipelining issues
+           ctx.forceDisconnect();
+
             String path = uri.getPath();
             if(path.startsWith(StaticToadlet.ROOT_URL)) {
                 staticToadlet.handleGet(uri, req, ctx);
@@ -101,9 +104,6 @@
                 HTMLNode logInfoboxContent = 
ctx.getPageMaker().getContentNode(logInfobox);
                 logInfoboxContent.addChild("%", FileUtil.readUTF(logs, 
logs.length()-2000).replaceAll("\n", "<br>\n"));

-                // If we don't disconnect we will have pipelining issues
-                ctx.forceDisconnect();
-                
                 //TODO: send a Retry-After header ?
                 writeHTMLReply(ctx, 503, desc, pageNode.generate());
             }


Reply via email to