Author: nextgens
Date: 2006-04-02 13:13:54 +0000 (Sun, 02 Apr 2006)
New Revision: 8433

Modified:
   trunk/freenet/src/freenet/clients/http/FproxyToadlet.java
   trunk/freenet/src/freenet/node/Version.java
Log:
613:

Hopefully fixes https://bugs.freenetproject.org/view.php?id=185

0000185: issues with pipelining? favicon.ico and CSS...

Modified: trunk/freenet/src/freenet/clients/http/FproxyToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/FproxyToadlet.java   2006-04-02 
12:58:56 UTC (rev 8432)
+++ trunk/freenet/src/freenet/clients/http/FproxyToadlet.java   2006-04-02 
13:13:54 UTC (rev 8433)
@@ -1,6 +1,7 @@
 package freenet.clients.http;

 import java.io.IOException;
+import java.io.InputStream;
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.net.MalformedURLException;
@@ -93,7 +94,19 @@
                        }
                        throw re;
                }else if(ks.equals("/favicon.ico")){
-                       this.writePermanentRedirect(ctx, "/static/favicon.ico", 
"/static/favicon.ico");
+                       byte[] buf = new byte[1024];
+                       int len;
+                       InputStream strm = 
getClass().getResourceAsStream("/static/favicon.ico");
+                       
+                       if (strm == null) {
+                               this.sendErrorPage(ctx, 404, "Path not found", 
"The specified path does not exist.");
+                               return;
+                       }
+                       ctx.sendReplyHeaders(200, "OK", null, "image/png", 
strm.available());
+                       
+                       while ( (len = strm.read(buf)) > 0) {
+                               ctx.writeData(buf, 0, len);
+                       }
                }

                if(ks.startsWith("/"))

Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-04-02 12:58:56 UTC (rev 
8432)
+++ trunk/freenet/src/freenet/node/Version.java 2006-04-02 13:13:54 UTC (rev 
8433)
@@ -20,7 +20,7 @@
        public static final String protocolVersion = "1.0";

        /** The build number of the current revision */
-       private static final int buildNumber = 612;
+       private static final int buildNumber = 613;

        /** Oldest build of Fred we will talk to */
        private static final int lastGoodBuild = 591;


Reply via email to