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.
This commit is contained in:
Dan Fandrich
2008-08-28 06:28:07 +00:00
parent fc9610919c
commit 8ce78ca488
5 changed files with 14 additions and 4 deletions

View File

@@ -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:
/*