Replace CURLOPT_POSTFIELDSIZE_LARGE with CURLOPT_POSTFIELDSIZE

Also adds a more robust interface for setopt that does
type checking based on the options used. This fixes one
bug where a F32 was passed and interpreted as long.
In many cases a U32 or S32 was passed as long, which
would fail (only) on a 64bit non-windows big endian machine.
This commit is contained in:
Aleric Inglewood
2012-08-10 04:18:04 +02:00
parent 0054e6a378
commit b2c5a84964
5 changed files with 133 additions and 20 deletions

View File

@@ -446,7 +446,7 @@ static LLSD blocking_request(
std::string body_str;
// * Set curl handle options
curlEasyRequest_w->setopt(CURLOPT_TIMEOUT, timeout); // seconds, see warning at top of function.
curlEasyRequest_w->setopt(CURLOPT_TIMEOUT, (long)timeout); // seconds, see warning at top of function.
curlEasyRequest_w->setWriteCallback(&LLHTTPBuffer::curl_write, &http_buffer);
// * Setup headers.