curl-library
Question about using curl_easy_setopt CURL_INFILESIZE_LARGE
From: Rohan Desai <desai.p.rohan_at_gmail.com>
Date: Wed, 8 Feb 2012 18:31:51 -0800
Date: Wed, 8 Feb 2012 18:31:51 -0800
Hello,
I am using libcurl to send an HTTP PUT. To set the Content-Length on upload
I use a call to:
curl_easy_setopt(*curl handle*, CURLOPT_INFILESIZE_LARGE, *file size*)
For most requests, i provide a curl_off_t for *file size*. However for
0-byte (empty) files i use:
curl_easy_setopt(*curl handle*, CURLOPT_INFILESIZE_LARGE, 0L)
This is causing my PUT to sometimes go out with huge Content-Length values.
For example:
Content-Length: 163208757248
Any ideas why this happens?
Thanks,
Rohan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-02-09