Diff
Not logged in

Differences From:

File src/xfer.c part of check-in [eea381f416] - Progress toward delta compression on the xfer protocol. The compression works well. But the client is not telling the server what files it has so the server does not have anything to delta against. by drh on 2007-08-09 03:19:18. [view]

To:

File src/xfer.c part of check-in [869534e182] - Fix a bug in the xfer server that prevents it from receiving deltas. by drh on 2007-08-09 03:44:31. [view]

@@ -189,8 +189,11 @@
     }else{
       cgi_printf("file %b %b %d\n", &uuid, &srcuuid, size);
       cgi_append_content(blob_buffer(&delta), size);
     }
+    blob_reset(&delta);
+    blob_reset(&srcuuid);
+    blob_reset(&uuid);
   }else{
     size = blob_size(&content);
     if( pOut ){
       blob_appendf(pOut, "file %b %d\n", &uuid, size);
@@ -340,9 +343,9 @@
     **   file UUID DELTASRC SIZE \n CONTENT
     **
     ** Accept a file from the client.
     */
-    if( blob_eq(&aToken[0], "file") && nToken>=2 && nToken<=3 ){
+    if( blob_eq(&aToken[0], "file") && nToken>=3 && nToken<=4 ){
       if( !isPush ){
         cgi_reset_content();
         @ error not\sauthorized\sto\swrite
         nErr++;