Author: toad
Date: 2006-12-15 20:51:26 +0000 (Fri, 15 Dec 2006)
New Revision: 11422

Modified:
   trunk/freenet/src/freenet/clients/http/FProxyToadlet.java
Log:
"Error: Splitfile error<pre>30 Data not found </pre>" (all encoded) -> actual 
tags

Modified: trunk/freenet/src/freenet/clients/http/FProxyToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/FProxyToadlet.java   2006-12-15 
20:34:54 UTC (rev 11421)
+++ trunk/freenet/src/freenet/clients/http/FProxyToadlet.java   2006-12-15 
20:51:26 UTC (rev 11422)
@@ -351,7 +351,6 @@

                } catch (FetchException e) {
                        String msg = e.getMessage();
-                       String extra = "";
                        if(e.mode == FetchException.NOT_ENOUGH_PATH_COMPONENTS) 
{
                                this.writePermanentRedirect(ctx, "Not enough 
meta-strings", '/' + key.toString() + '/' + override);
                        } else if(e.newURI != null) {
@@ -413,15 +412,16 @@
                                pageNode.generate(pageBuffer);
                                writeReply(ctx, 200, "text/html", "OK", 
pageBuffer.toString());
                        } else {
-                               if(e.errorCodes != null)
-                                       extra = 
"<pre>"+e.errorCodes.toVerboseString()+"</pre>";
                                HTMLNode pageNode = 
ctx.getPageMaker().getPageNode(FetchException.getShortMessage(e.mode));
                                HTMLNode contentNode = 
ctx.getPageMaker().getContentNode(pageNode);

                                HTMLNode infobox = contentNode.addChild("div", 
"class", "infobox infobox-error");
                                infobox.addChild("div", "class", 
"infobox-header", FetchException.getShortMessage(e.mode));
                                HTMLNode infoboxContent = 
infobox.addChild("div", "class", "infobox-content");
-                               infoboxContent.addChild("#", "Error: " + msg + 
extra);
+                               HTMLNode err = infoboxContent.addChild("#", 
"Error: "+msg);
+                               if(e.errorCodes != null) {
+                                       err.addChild("pre").addChild("#", 
e.errorCodes.toVerboseString());
+                               }
                                infoboxContent.addChild("br");
                                
infoboxContent.addChild(ctx.getPageMaker().createBackLink(ctx));
                                infoboxContent.addChild("br");


Reply via email to