aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-07-27 22:29:50 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-07-27 22:29:50 +0000
commit726b9e2240a272304cefc61b6fb9d9bb9a9a78f4 (patch)
tree0241cfe3bfc111830ffb5f24329f2a5cd326d6fe /lib/url.c
parent2236ba0d206fe9fef5d93889ee652feaa03fe089 (diff)
If any of the options CURLOPT_HTTPGET, CURLOPT_POST and CURLOPT_HTTPPOST is
set to 1, CURLOPT_NOBODY will now automatically be set to 0.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index 07a34a94e..7c34ee19a 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -644,8 +644,10 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
/* Does this option serve a purpose anymore? Yes it does, when
CURLOPT_POSTFIELDS isn't used and the POST data is read off the
callback! */
- if(va_arg(param, long))
+ if(va_arg(param, long)) {
data->set.httpreq = HTTPREQ_POST;
+ data->set.opt_no_body = FALSE; /* this is implied */
+ }
else
data->set.httpreq = HTTPREQ_GET;
break;
@@ -680,6 +682,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
*/
data->set.httppost = va_arg(param, struct curl_httppost *);
data->set.httpreq = HTTPREQ_POST_FORM;
+ data->set.opt_no_body = FALSE; /* this is implied */
break;
case CURLOPT_REFERER:
@@ -813,6 +816,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
if(va_arg(param, long)) {
data->set.httpreq = HTTPREQ_GET;
data->set.upload = FALSE; /* switch off upload */
+ data->set.opt_no_body = FALSE; /* this is implied */
}
break;