Author: toad
Date: 2006-01-27 20:39:29 +0000 (Fri, 27 Jan 2006)
New Revision: 7955
Modified:
trunk/freenet/src/freenet/client/FetchException.java
trunk/freenet/src/freenet/client/async/SingleFileFetcher.java
trunk/freenet/src/freenet/node/Version.java
Log:
Make the / at the end of a URI mandatory, even if the document is the default
document.
Hence:
SSK at blah,blah/blah/ is valid but
SSK at blah,blah/blah is not.
Also update FetchException.isFatal (there is probably still more to do on that).
Modified: trunk/freenet/src/freenet/client/FetchException.java
===================================================================
--- trunk/freenet/src/freenet/client/FetchException.java 2006-01-27
20:28:55 UTC (rev 7954)
+++ trunk/freenet/src/freenet/client/FetchException.java 2006-01-27
20:39:29 UTC (rev 7955)
@@ -190,7 +190,7 @@
case TOO_MANY_BLOCKS_PER_SEGMENT:
return "Too many blocks per segment";
case NOT_ENOUGH_METASTRINGS:
- return "No default document; give more metastrings
(path components) in URI";
+ return "Give more metastrings (path components) in URI";
// FIXME better description for above
case CANCELLED:
return "Cancelled by caller";
@@ -267,6 +267,7 @@
case FetchException.ARCHIVE_FAILURE:
case FetchException.BLOCK_DECODE_ERROR:
case FetchException.HAS_MORE_METASTRINGS:
+ case FetchException.NOT_ENOUGH_METASTRINGS:
case FetchException.INVALID_METADATA:
case FetchException.NOT_IN_ARCHIVE:
case FetchException.TOO_DEEP_ARCHIVE_RECURSION:
Modified: trunk/freenet/src/freenet/client/async/SingleFileFetcher.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SingleFileFetcher.java
2006-01-27 20:28:55 UTC (rev 7954)
+++ trunk/freenet/src/freenet/client/async/SingleFileFetcher.java
2006-01-27 20:39:29 UTC (rev 7955)
@@ -215,7 +215,7 @@
if(metadata.isSimpleManifest()) {
String name;
if(metaStrings.isEmpty())
- name = null;
+ throw new
FetchException(FetchException.NOT_ENOUGH_METASTRINGS);
else
name = (String)
metaStrings.removeFirst();
// Since metadata is a document, we just
replace metadata here
Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-01-27 20:28:55 UTC (rev
7954)
+++ trunk/freenet/src/freenet/node/Version.java 2006-01-27 20:39:29 UTC (rev
7955)
@@ -20,7 +20,7 @@
public static final String protocolVersion = "1.0";
/** The build number of the current revision */
- private static final int buildNumber = 405;
+ private static final int buildNumber = 406;
/** Oldest build of Fred we will talk to */
private static final int lastGoodBuild = 403;