upload sets HTTP request to PUT for "HTTP upload"

This commit is contained in:
Daniel Stenberg 2001-01-29 07:23:11 +00:00
parent 6dc5c6ffc7
commit 4cc76d1576

View File

@ -339,6 +339,9 @@ CURLcode curl_setopt(CURL *curl, CURLoption option, ...)
break;
case CURLOPT_UPLOAD:
data->bits.upload = va_arg(param, long)?TRUE:FALSE;
if(data->bits.upload)
/* If this is HTTP, PUT is what's needed to "upload" */
data->httpreq = HTTPREQ_PUT;
break;
case CURLOPT_POST:
data->bits.http_post = va_arg(param, long)?TRUE:FALSE;