Check-in [bb3a25e2f0]
Not logged in
Overview

SHA1 Hash:bb3a25e2f0eca8754258c36ce92f71cc3630fb97
Date: 2008-01-31 22:04:42
User: drh
Comment:Add a configuration option to the Setup/Access page that allows the user to set the xfer download limit. Increase the default xfer download limit to 5 million bytes. Increase the minimum phantom request limit from 100 to 200.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/setup.c from [89b2ca9e01] to [92e6402865].

@@ -528,10 +528,19 @@
   @ <hr>
   entry_attribute("Login expiration time", 6, "cookie-expire", "cex", "8766");
   @ <p>The number of hours for which a login is valid.  This must be a
   @ positive number.  The default is 8760 hours which is approximately equal
   @ to a year.</p>
+
+  @ <hr>
+  entry_attribute("Download packet limit", 10, "max-download", "mxdwn",
+                  "5000000");
+  @ <p>Fossil tries to limit out-bound sync, clone, and pull packets
+  @ to this many bytes, uncompressed.  If the client requires more data
+  @ than this, then the client will issue multiple HTTP requests.
+  @ Values below 1 million are not recommended.  5 million is a
+  @ reasonable number.</p>
 
   @ <hr>
   @ <p><input type="submit"  name="submit" value="Apply Changes"></p>
   @ </form>
   db_end_transaction(0);

Modified src/xfer.c from [83f986fb90] to [f7995ea18a].

@@ -464,11 +464,11 @@
   blobarray_zero(xfer.aToken, count(xfer.aToken));
   cgi_set_content_type(g.zContentType);
   blob_zero(&xfer.err);
   xfer.pIn = &g.cgiIn;
   xfer.pOut = cgi_output_blob();
-  xfer.mxSend = db_get_int("max-download", 1000000);
+  xfer.mxSend = db_get_int("max-download", 5000000);
 
   db_begin_transaction();
   db_multi_exec(
      "CREATE TEMP TABLE onremote(rid INTEGER PRIMARY KEY);"
   );
@@ -936,11 +936,11 @@
     */
     nFileRecv = xfer.nFileRcvd + xfer.nDeltaRcvd + xfer.nDanglingFile;
     if( (nFileRecv>0 || newPhantom) && db_exists("SELECT 1 FROM phantom") ){
       go = 1;
       mxPhantomReq = nFileRecv*2;
-      if( mxPhantomReq<100 ) mxPhantomReq = 100;
+      if( mxPhantomReq<200 ) mxPhantomReq = 200;
     }
     nMsg = 0;
     xfer.nFileRcvd = 0;
     xfer.nDeltaRcvd = 0;
     xfer.nDanglingFile = 0;