diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-07-27 22:29:50 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-07-27 22:29:50 +0000 |
commit | 726b9e2240a272304cefc61b6fb9d9bb9a9a78f4 (patch) | |
tree | 0241cfe3bfc111830ffb5f24329f2a5cd326d6fe /lib | |
parent | 2236ba0d206fe9fef5d93889ee652feaa03fe089 (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')
-rw-r--r-- | lib/url.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; |