]> granicus.if.org Git - curl/commitdiff
Jon Travis suggested fix. when CURLOPT_HTTPGET is used we must assign
authorDaniel Stenberg <daniel@haxx.se>
Wed, 5 Dec 2001 06:47:01 +0000 (06:47 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 5 Dec 2001 06:47:01 +0000 (06:47 +0000)
set.upload to FALSE or else we might still get an upload if the previous
operation was an upload!

lib/url.c

index 1ffe5dae9a26ec95ac04c6396e074e551d0bd87d..3b5482c2b333503023b8e7a6dc0c91913e4610e0 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -556,8 +556,10 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
     /*
      * Set to force us do HTTP GET
      */
-    if(va_arg(param, long))
+    if(va_arg(param, long)) {
       data->set.httpreq = HTTPREQ_GET;
+      data->set.upload = FALSE; /* switch off upload */
+    }
     break;
 
   case CURLOPT_INFILE: