curl-users
Wrong file status if downloaded is continued
Date: Thu, 7 Oct 2010 23:25:13 +0530
Hi,
The files have different STAT when download is paused.
shadyabhi_at_ArchLinux /tmp $ curl --range 0-40000 -C -
http://dl.dropbox.com/u/7728421/Academic%20Calendar%202010-11_Provisional.pdf
-O
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
50 40001 50 20140 0 0 2059 0 0:00:19 0:00:09 0:00:10 2419^C
shadyabhi_at_ArchLinux /tmp $ curl --range 0-40000 -C -
http://dl.dropbox.com/u/7728421/Academic%20Calendar%202010-11_Provisional.pdf
-O
** Resuming transfer from byte position 20480
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 36544 100 36544 0 0 1988 0 0:00:18 0:00:18 --:--:-- 3769
shadyabhi_at_ArchLinux /tmp $ stat Academic%20Calendar%202010-11_Provisional.pdf
File: `Academic%20Calendar%202010-11_Provisional.pdf'
Size: 57024 Blocks: 112 IO Block: 4096 regular file
Device: 801h/2049d Inode: 784198 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/shadyabhi) Gid: ( 100/ users)
Access: 2010-10-07 23:15:57.283334502 +0530
Modify: 2010-10-07 23:16:25.140001176 +0530
Change: 2010-10-07 23:16:25.140001176 +0530
shadyabhi_at_ArchLinux /tmp $
So, size is 57024 which should be 40001 as I downloaded only that much data.
But, if I directly download the file, STAT is different..
shadyabhi_at_ArchLinux /tmp/tm $ tsocks curl --range 0-40000 -C -
http://dl.dropbox.com/u/7728421/Academic%20Calendar%202010-11_Provisional.pdf
-O
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 40001 100 40001 0 0 1906 0 0:00:20 0:00:20 --:--:-- 3372
shadyabhi_at_ArchLinux /tmp/tm $ stat
Academic%20Calendar%202010-11_Provisional.pdf
File: `Academic%20Calendar%202010-11_Provisional.pdf'
Size: 40001 Blocks: 80 IO Block: 4096 regular file
Device: 801h/2049d Inode: 1570511 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/shadyabhi) Gid: ( 100/ users)
Access: 2010-10-07 23:14:14.333334503 +0530
Modify: 2010-10-07 23:14:33.496667836 +0530
Change: 2010-10-07 23:14:33.496667836 +0530
shadyabhi_at_ArchLinux /tmp/tm $
I think its a bug.. Please share your thoughts..
-- Abhijeet Rastogi http://www.google.com/profiles/abhijeet.1989 -- Abhijeet Rastogi http://www.google.com/profiles/abhijeet.1989 ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-users FAQ: http://curl.haxx.se/docs/faq.html Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2010-10-07