From: Daniel Stenberg Date: Mon, 29 Jan 2001 07:23:11 +0000 (+0000) Subject: upload sets HTTP request to PUT for "HTTP upload" X-Git-Tag: curl-7_6_1-pre1~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cc76d157673c46434a5d3f59b2e61b85ca9e756;p=thirdparty%2Fcurl.git upload sets HTTP request to PUT for "HTTP upload" --- diff --git a/lib/url.c b/lib/url.c index 58965123a8..e37f241637 100644 --- a/lib/url.c +++ b/lib/url.c @@ -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;