Re: Proxying downloads

2007-10-30 Thread Martin Sand Christensen
> But I can't figure out how I would solve the following: > > 1 Alice asks Sam for "foobar.iso" > 2 Sam can't find "foobar.iso" in "cachedir" > 3 Sam requests "foobar.iso" from uplink > 4 Sam saves and forwards to Alice > 5 At about 30 % of the download Bob asks Sam for "foobar.iso" > 6 How do I se

Re: Proxying downloads

2007-10-30 Thread Jeff
You use a temp directory to store the file while downloading, then move it to the cache so the addition of the complete file is atomic. The file name of the temp file should be checked to validate that you don't overwrite another process' download. Currently downloading urls should be registered w