Download head of file
Date: Sun, 03 Sep 2006 21:09:18 +0300
I develop a service where users enter an url and script should download
this page to process. But one may enter the url of huge file I don't
want to download. But it is need to view first few kbytes.
For this purpose I've patched curl-7.15.4 to add new parameter
Specify the maximum size (in bytes) of a file to store on disk.
If the file requested is larger than this value, then transfer
will be terminated and curl returns error 23 (Write error). File
will be incomplete and takes exactly <bytes> size of space.
I'm doubted it is extremely needed functionality to be added into head cvs. But if you need this you may get the patch here http://www.openhills.com/~alek/curl-7.15.4_1.patch
And here http://www.openhills.com/~alek/ some instructions how to use it.
-- Oleg Lomaka, oleg.lomaka at gmail dot com, ALEK-RIPE, ALEK-UANICReceived on 2006-09-03