aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2008-08-28 06:28:07 +0000
committerDan Fandrich <dan@coneharvesters.com>2008-08-28 06:28:07 +0000
commit8ce78ca488f589d9b1987e7713f28f9da15cba0f (patch)
tree3b61c201ab53f9581a30386d454a7ba37ef7b9a3 /lib/url.c
parentfc9610919cd002aef954166295538bf3d43c28c9 (diff)
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.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c3
1 files changed, 3 insertions, 0 deletions
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:
/*