Author: toad
Date: 2007-02-22 02:40:27 +0000 (Thu, 22 Feb 2007)
New Revision: 11899

Modified:
   trunk/freenet/src/freenet/client/FetchException.java
   trunk/freenet/src/freenet/client/async/SingleFileFetcher.java
   trunk/freenet/src/freenet/client/async/SplitFileFetcher.java
Log:
Slightyl more accurate

Modified: trunk/freenet/src/freenet/client/FetchException.java
===================================================================
--- trunk/freenet/src/freenet/client/FetchException.java        2007-02-22 
02:37:18 UTC (rev 11898)
+++ trunk/freenet/src/freenet/client/FetchException.java        2007-02-22 
02:40:27 UTC (rev 11899)
@@ -439,4 +439,8 @@
                        return false; // assume it isn't
                }
        }
+
+       public void setNotFinalizedSize() {
+               this.finalizedSizeAndMimeType = false;
+       }
 }

Modified: trunk/freenet/src/freenet/client/async/SingleFileFetcher.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SingleFileFetcher.java       
2007-02-22 02:37:18 UTC (rev 11898)
+++ trunk/freenet/src/freenet/client/async/SingleFileFetcher.java       
2007-02-22 02:40:27 UTC (rev 11899)
@@ -468,6 +468,7 @@
                        } catch (MetadataParseException e) {
                                SingleFileFetcher.this.onFailure(new 
FetchException(e));
                        } catch (FetchException e) {
+                               e.setNotFinalizedSize();
                                SingleFileFetcher.this.onFailure(e);
                        } catch (ArchiveFailureException e) {
                                SingleFileFetcher.this.onFailure(new 
FetchException(e));
@@ -507,6 +508,7 @@
                                SingleFileFetcher.this.onFailure(new 
FetchException(FetchException.BUCKET_ERROR, e));
                                return;
                        } catch (FetchException e) {
+                               e.setNotFinalizedSize();
                                onFailure(e, SingleFileFetcher.this);
                        } catch (ArchiveFailureException e) {
                                onFailure(new 
FetchException(FetchException.ARCHIVE_FAILURE), SingleFileFetcher.this);

Modified: trunk/freenet/src/freenet/client/async/SplitFileFetcher.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SplitFileFetcher.java        
2007-02-22 02:37:18 UTC (rev 11898)
+++ trunk/freenet/src/freenet/client/async/SplitFileFetcher.java        
2007-02-22 02:40:27 UTC (rev 11899)
@@ -90,7 +90,7 @@
                }

                if(overrideLength > 0 && newCtx.maxOutputLength > 0 && 
overrideLength > newCtx.maxOutputLength)
-                       throw new FetchException(FetchException.TOO_BIG, 
overrideLength, false /* FIXME should be true but then need to ensure it is 
false if we are in a MultiLevel etc */, clientMetadata.getMIMEType());
+                       throw new FetchException(FetchException.TOO_BIG, 
overrideLength, true, clientMetadata.getMIMEType());

                if(splitfileType == Metadata.SPLITFILE_NONREDUNDANT) {
                        // Don't need to do much - just fetch everything and 
piece it together.


Reply via email to