cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: http put......

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 2 Apr 2009 23:18:56 -0600

On Thu, Apr 02, 2009 at 03:50:57PM +0530, neha bhagat wrote:
> Can CURLOPT_RESUME_FROM option be used for put method.......
>
> Actually I need to send data partially......Eg: 4GB file will be send in 4 1GB
> chunks
>
> the options that i hve set are as under:
>
> if((result = curl_easy_setopt(obj->client_handle,CURLOPT_RESUME_FROM_LARGE ,
>                                    offset))!= CURL_OK)
>     {
> #ifdef  DEBUG_WARNING
>         printf("mbx_curl_setopt : range  option failed\n") ;
> #endif
>         goto error ;
>     }
>
> where offset indicates the starting byte of chunk.....
>
> bt it curl_easy_perform fails for all other chunks except when offset =0....

As long as you also set the total file length with
CURLOPT_INFILESIZE_LARGE, libcurl will send an appropriate Content-Range:
line to the server and all should go well, assuming that the server supports
partial uploads.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2009-04-03