From 8ce78ca488f589d9b1987e7713f28f9da15cba0f Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Thu, 28 Aug 2008 06:28:07 +0000 Subject: Fixed test case 1065 by changing the handling of CURLOPT_UPLOAD to set the HTTP method to GET (or HEAD) when given a value of 0. --- lib/url.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/url.c') diff --git a/lib/url.c b/lib/url.c index 41222f0ec..a70b471b2 100644 --- a/lib/url.c +++ b/lib/url.c @@ -888,6 +888,9 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, if(data->set.upload) /* If this is HTTP, PUT is what's needed to "upload" */ data->set.httpreq = HTTPREQ_PUT; + else + /* In HTTP, the opposite of upload is either GET or a HEAD */ + data->set.httpreq = data->set.opt_no_body?HTTPREQ_HEAD:HTTPREQ_GET; break; case CURLOPT_FILETIME: /* -- cgit v1.2.3