diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-04-03 21:44:49 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-04-03 21:44:49 +0000 |
commit | a9c1ca9fc5a80e858b0c85d8f8c838b4464526db (patch) | |
tree | 276acdf9cacecf5606884ed5be1f3a8d9c513a5a | |
parent | d051dd80874bffcd6df56a09ba6cc2cf29de4d88 (diff) |
- Setting CURLOPT_NOBODY to FALSE will now switch the HTTP request method to
GET simply because previously when you set CURLOPT_NOBODY to TRUE first and
then FALSE you'd end up in a broken state where a HTTP request would do a
HEAD by still act a lot like for a GET and hang waiting for the content etc.
-rw-r--r-- | CHANGES | 5 | ||||
-rw-r--r-- | RELEASE-NOTES | 3 | ||||
-rw-r--r-- | TODO-RELEASE | 3 | ||||
-rw-r--r-- | lib/url.c | 10 |
4 files changed, 14 insertions, 7 deletions
@@ -7,6 +7,11 @@ Changelog Daniel Stenberg (3 Apr 2008) +- Setting CURLOPT_NOBODY to FALSE will now switch the HTTP request method to + GET simply because previously when you set CURLOPT_NOBODY to TRUE first and + then FALSE you'd end up in a broken state where a HTTP request would do a + HEAD by still act a lot like for a GET and hang waiting for the content etc. + - Scott Barrett added support for CURLOPT_NOBODY over SFTP Daniel Fandrich (3 Apr 2008) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 19a053ea1..912983ad0 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -15,7 +15,8 @@ This release includes the following changes: This release includes the following bugfixes: - o + o CURLOPT_NOBODY first set to TRUE and then FALSE for HTTP no longer causes + the confusion that could lead to a hung transfer This release includes the following known bugs: diff --git a/TODO-RELEASE b/TODO-RELEASE index 1a6e18846..650e8915d 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,7 +7,4 @@ To be addressed before 7.18.2 (planned release: June 2008) 130 - Vincent Le Normand's SFTP patch for touch (lacking feedback) -133 - Setting CURLOPT_NOBODY to "false" causes cURL to wait for content if a - content-length header is read - 134 - @@ -858,9 +858,13 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, * Do not include the body part in the output data stream. */ data->set.opt_no_body = (bool)(0 != va_arg(param, long)); - if(data->set.opt_no_body) - /* in HTTP lingo, this means using the HEAD request */ - data->set.httpreq = HTTPREQ_HEAD; + + /* in HTTP lingo, no body means using the HEAD request and if unset there + really is no perfect method that is the "opposite" of HEAD but in + reality most people probably think GET then. The important thing is + that we can't let it remain HEAD if the opt_no_body is set FALSE since + then we'll behave wrong when getting HTTP. */ + data->set.httpreq = data->set.opt_no_body?HTTPREQ_HEAD:HTTPREQ_GET; break; case CURLOPT_FAILONERROR: /* |