]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
upload sets HTTP request to PUT for "HTTP upload"
authorDaniel Stenberg <daniel@haxx.se>
Mon, 29 Jan 2001 07:23:11 +0000 (07:23 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 29 Jan 2001 07:23:11 +0000 (07:23 +0000)
lib/url.c

index 58965123a89d4dca3c081359532fd11e458766ee..e37f241637a62d6c68c42904231bb342e4822d10 100644 (file)
--- 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;