"M.Kirillov" <[EMAIL PROTECTED]> wrote:
> After losing another me-vs-fetchmail-who-is-faster game I
> made myself to stop wwwoffle deleting downloaded files.
> 
> This is a result of my approach:

> -          if(n<0 || err==-1)
> +          /* if(n<0 || err==-1)
>              {
>               reply_head->status=503;
>               head=HeaderString(reply_head);
> @@ -1322,7 +1322,7 @@
>               ftruncate(spool,0);
>               write_string(spool,head);
>               free(head);
> -            }
> +            } */


> Just quick and dirty. In fact, I'm not sure the code I've
> commented should be removed. I think it was inserted for a
> case "if something goes wrong." In practice, the "something"
> goes wrong too often to ignore this. I don't understand what
> exactly.

Looking back I can see that I made a change on 13th November 2000 for
version 2.6 that added the ftruncate() line in.  The rest of the code
that you have commented out has been in place since version 2.5b.

I think that you need to remove the ftruncate() line only, the rest of
the code just replaces the HTTP status number with a 503 that
indicates a server error.  This encourages the browser to re-request
the file.  The only time that this happens is if you enable the
intr-download-keep or timeout-download-keep options.

I don't know why I made this change, it was just a one-line change to
the file and I can't find any record of the reason for it.  It could
have been to try and fix a problem that was fixed in version 2.6b by
adding an ftruncate() line somewhere else.

I will remove the ftruncate() for version 2.6c.

-- 
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop                             [EMAIL PROTECTED]
                                      http://www.gedanken.demon.co.uk/

WWWOFFLE users page:
        http://www.gedanken.demon.co.uk/wwwoffle/version-2.6/user.html

Reply via email to