Author: dbkr
Date: 2006-05-14 11:57:31 +0000 (Sun, 14 May 2006)
New Revision: 8700

Modified:
   trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java
Log:
A couple of changes in DarknetConnectionsToadlet where an HTTP response was 
given instead of a human readable error summary.


Modified: trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java       
2006-05-14 11:54:07 UTC (rev 8699)
+++ trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java       
2006-05-14 11:57:31 UTC (rev 8700)
@@ -250,7 +250,7 @@
                                                ref += line+"\n";
                                        }
                                } catch (IOException e) {
-                                       this.sendErrorPage(ctx, 200, "OK", 
"Failed to add node: Unable to retrieve node reference from "+urltext+".");
+                                       this.sendErrorPage(ctx, 200, "Failed to 
Add Node", "Failed to add node: Unable to retrieve node reference from 
"+urltext+".");
                                } finally {
                                        if( in != null ){
                                                in.close();
@@ -261,7 +261,7 @@
                                // this slightly scary looking regexp chops any 
extra characters off the beginning or ends of lines and removes extra line 
breaks
                                ref = 
reftext.replaceAll(".*?((?:[\\w,\\.]+\\=[^\r\n]+?)|(?:End))[ 
\\t]*(?:\\r?\\n)+", "$1\n");
                        } else {
-                               this.sendErrorPage(ctx, 200, "OK", "Failed to 
add node: Could not detect either a node reference or a URL. Please <a 
href=\".\">Try again</a>.");
+                               this.sendErrorPage(ctx, 200, "Failed to Add 
Node", "Failed to add node: Could not detect either a node reference or a URL. 
Please <a href=\".\">Try again</a>.");
                                request.freeParts();
                                return;
                        }


Reply via email to