mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
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.
This commit is contained in:
parent
2236ba0d20
commit
726b9e2240
4
CHANGES
4
CHANGES
@ -7,6 +7,10 @@
|
||||
Changelog
|
||||
|
||||
|
||||
Daniel (28 July 2005)
|
||||
- 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.
|
||||
|
||||
Daniel (27 July 2005)
|
||||
- Dan Fandrich changes over the last week: fixed numerous minor configure
|
||||
option parsing flaws: --without-gnutls, --without-spnego --without-gssapi
|
||||
|
@ -18,6 +18,7 @@ This release includes the following changes:
|
||||
|
||||
This release includes the following bugfixes:
|
||||
|
||||
o CURLOPT_HTTPGET, CURLOPT_POST and CURLOPT_HTTPPOST resets CURLOPT_NOBODY
|
||||
o builds fine on AmigaOS again
|
||||
o corrected date parsing on Windows with auto-DST-adjust enabled
|
||||
o treats CONNECT 407 responses with bodies better during Digest/NTLM auth
|
||||
|
@ -21,7 +21,7 @@
|
||||
.\" * $Id$
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH curl_easy_setopt 3 "13 Jul 2005" "libcurl 7.14.1" "libcurl Manual"
|
||||
.TH curl_easy_setopt 3 "28 Jul 2005" "libcurl 7.14.1" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_easy_setopt - set options for a curl easy handle
|
||||
.SH SYNOPSIS
|
||||
@ -525,8 +525,11 @@ adding a header like "Transfer-Encoding: chunked" with
|
||||
\fICURLOPT_HTTPHEADER\fP. With HTTP 1.0 or without chunked transfer, you must
|
||||
specify the size in the request.
|
||||
|
||||
NOTE: if you have issued a POST request and want to make a HEAD or GET
|
||||
instead, you must explictly pick the new request type using
|
||||
When setting \fICURLOPT_POST\fP to a non-zero value, it will automatically set
|
||||
\fICURLOPT_NOBODY\fP to 0.
|
||||
|
||||
If you issue a POST request and then want to make a HEAD or GET using the same
|
||||
re-used handle, you must explictly set the new request type using
|
||||
\fICURLOPT_NOBODY\fP or \fICURLOPT_HTTPGET\fP or similar.
|
||||
.IP CURLOPT_POSTFIELDS
|
||||
Pass a char * as parameter, which should be the full data to post in an HTTP
|
||||
@ -564,6 +567,9 @@ must remain intact until you close this curl handle again with
|
||||
|
||||
Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
|
||||
You can disable this header with \fICURLOPT_HTTPHEADER\fP as usual.
|
||||
|
||||
When setting \fICURLOPT_HTTPPOST\fP, it will automatically set
|
||||
\fICURLOPT_NOBODY\fP to 0.
|
||||
.IP CURLOPT_REFERER
|
||||
Pass a pointer to a zero terminated string as parameter. It will be used to
|
||||
set the Referer: header in the http request sent to the remote server. This
|
||||
@ -664,6 +670,9 @@ was not enabled it will enable its cookie engine. Passing a magic string
|
||||
Pass a long. If the long is non-zero, this forces the HTTP request to get back
|
||||
to GET. usable if a POST, HEAD, PUT or a custom request have been used
|
||||
previously using the same curl handle.
|
||||
|
||||
When setting \fICURLOPT_HTTPGET\fP to a non-zero value, it will automatically
|
||||
set \fICURLOPT_NOBODY\fP to 0.
|
||||
.IP CURLOPT_HTTP_VERSION
|
||||
Pass a long, set to one of the values described below. They force libcurl to
|
||||
use the specific HTTP versions. This is not sensible to do unless you have a
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user