diff options
author | Daniel Stenberg <daniel@haxx.se> | 2001-01-27 17:58:15 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2001-01-27 17:58:15 +0000 |
commit | 62fec1d28d6fb3b9f747f4bc0134ea31e4c18797 (patch) | |
tree | 8cde58aa1163c5bf87374350707528018735d7a5 | |
parent | ac98c73b04aec60683ec2094f3c311485f08d6ab (diff) |
data->httpreq was not set properly
-rw-r--r-- | lib/url.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -342,7 +342,8 @@ CURLcode curl_setopt(CURL *curl, CURLoption option, ...) break; case CURLOPT_POST: data->bits.http_post = va_arg(param, long)?TRUE:FALSE; - data->httpreq = HTTPREQ_POST; + if(data->bits.http_post) + data->httpreq = HTTPREQ_POST; break; case CURLOPT_FILETIME: data->bits.get_filetime = va_arg(param, long)?TRUE:FALSE; @@ -364,7 +365,8 @@ CURLcode curl_setopt(CURL *curl, CURLoption option, ...) break; case CURLOPT_PUT: data->bits.http_put = va_arg(param, long)?TRUE:FALSE; - data->httpreq = HTTPREQ_PUT; + if(data->bits.http_put) + data->httpreq = HTTPREQ_PUT; break; case CURLOPT_MUTE: data->bits.mute = va_arg(param, long)?TRUE:FALSE; @@ -406,12 +408,14 @@ CURLcode curl_setopt(CURL *curl, CURLoption option, ...) break; case CURLOPT_CUSTOMREQUEST: data->customrequest = va_arg(param, char *); - data->httpreq = HTTPREQ_CUSTOM; + if(data->customrequest) + data->httpreq = HTTPREQ_CUSTOM; break; case CURLOPT_HTTPPOST: data->httppost = va_arg(param, struct HttpPost *); data->bits.http_formpost = data->httppost?1:0; - data->httpreq = HTTPREQ_POST_FORM; + if(data->bits.http_formpost) + data->httpreq = HTTPREQ_POST_FORM; break; case CURLOPT_INFILE: data->in = va_arg(param, FILE *); |