I thought something like that. But after looking in the code it seems like it just assigns some curl_off_t variable the passed in value and later uses that variable to populate the content length. Shouldn't the internal curl_off_t get zeroed out regardless of whether the value passed to curl_easy_setopt is long or curl_off_t ? In other words, any insight into exactly why this is happening?
On Thu, Feb 9, 2012 at 2:53 AM, Dan Fandrich <[email protected]> wrote: > On Wed, Feb 08, 2012 at 06:31:51PM -0800, Rohan Desai wrote: > > 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? > > CURLOPT_INFILESIZE_LARGE doesn't take a long parameter, but rather a > curl_off_t parameter. Try casting your 0 to (curl_off_t) and see if > that fixes it. That goes for all other *_LARGE options as well. > > >>> Dan > > ------------------------------------------------------------------- > List admin: http://cool.haxx.se/list/listinfo/curl-library > Etiquette: http://curl.haxx.se/mail/etiquette.html >
------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
