Fixed test case 1065 by changing the handling of CURLOPT_UPLOAD to set
the HTTP method to GET (or HEAD) when given a value of 0.
This commit is contained in:
parent
fc9610919c
commit
8ce78ca488
7
CHANGES
7
CHANGES
@ -6,6 +6,13 @@
|
|||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
|
Daniel Fandrich (27 Aug 2008)
|
||||||
|
- Fixed test case 1065 by changing the handling of CURLOPT_UPLOAD to set
|
||||||
|
the HTTP method to GET (or HEAD) when given a value of 0.
|
||||||
|
|
||||||
|
- Added test cases 1068 and 1069 to test a simple HTTP PUT from stdin. Test
|
||||||
|
case 1069 fails in a similar manner to test 1065 so is added to DISABLED.
|
||||||
|
|
||||||
Yang Tse (27 Aug 2008)
|
Yang Tse (27 Aug 2008)
|
||||||
- Fix generation of MS VC6 .dsp file to make it support compilation of either
|
- Fix generation of MS VC6 .dsp file to make it support compilation of either
|
||||||
dynamic (DLL) or static (LIB) libcurl libraries in debug and release modes.
|
dynamic (DLL) or static (LIB) libcurl libraries in debug and release modes.
|
||||||
|
@ -58,6 +58,7 @@ This release includes the following bugfixes:
|
|||||||
o improved curl_m*printf() integral data type size and signedness handling
|
o improved curl_m*printf() integral data type size and signedness handling
|
||||||
o error when --dump-header - used with more than one URL
|
o error when --dump-header - used with more than one URL
|
||||||
o proxy closing connect during CONNECT with auth with the multi interface
|
o proxy closing connect during CONNECT with auth with the multi interface
|
||||||
|
o CURLOPT_UPLOAD sets HTTP method back to GET or HEAD when passed in a 0
|
||||||
|
|
||||||
This release includes the following known bugs:
|
This release includes the following known bugs:
|
||||||
|
|
||||||
|
@ -888,6 +888,9 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
|
|||||||
if(data->set.upload)
|
if(data->set.upload)
|
||||||
/* If this is HTTP, PUT is what's needed to "upload" */
|
/* If this is HTTP, PUT is what's needed to "upload" */
|
||||||
data->set.httpreq = HTTPREQ_PUT;
|
data->set.httpreq = HTTPREQ_PUT;
|
||||||
|
else
|
||||||
|
/* In HTTP, the opposite of upload is either GET or a HEAD */
|
||||||
|
data->set.httpreq = data->set.opt_no_body?HTTPREQ_HEAD:HTTPREQ_GET;
|
||||||
break;
|
break;
|
||||||
case CURLOPT_FILETIME:
|
case CURLOPT_FILETIME:
|
||||||
/*
|
/*
|
||||||
|
@ -3,5 +3,4 @@
|
|||||||
# test cases are run by runtests.pl. Just add the plain test case numbers, one
|
# test cases are run by runtests.pl. Just add the plain test case numbers, one
|
||||||
# per line.
|
# per line.
|
||||||
# Lines starting with '#' letters are treated as comments.
|
# Lines starting with '#' letters are treated as comments.
|
||||||
1065
|
|
||||||
1069
|
1069
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
<keywords>
|
<keywords>
|
||||||
HTTP
|
HTTP
|
||||||
HTTP PUT
|
HTTP PUT
|
||||||
|
HTTP GET
|
||||||
</keywords>
|
</keywords>
|
||||||
</info>
|
</info>
|
||||||
|
|
||||||
@ -35,7 +36,7 @@ http
|
|||||||
HTTP PUT with one file but two URLs
|
HTTP PUT with one file but two URLs
|
||||||
</name>
|
</name>
|
||||||
<command>
|
<command>
|
||||||
-H "Expect:" -T log/1065 http://%HOSTIP:%HTTPPORT/1065.upload1 http://%HOSTIP:%HTTPPORT/10650002.upload2
|
-H "Expect:" -T log/1065 http://%HOSTIP:%HTTPPORT/1065.upload1 http://%HOSTIP:%HTTPPORT/10650002.url2
|
||||||
</command>
|
</command>
|
||||||
<file name="log/1065">
|
<file name="log/1065">
|
||||||
test
|
test
|
||||||
@ -54,10 +55,9 @@ Accept: */*
|
|||||||
Content-Length: 5
|
Content-Length: 5
|
||||||
|
|
||||||
test
|
test
|
||||||
PUT /10650002.upload2 HTTP/1.1
|
GET /10650002.url2 HTTP/1.1
|
||||||
Host: %HOSTIP:%HTTPPORT
|
Host: %HOSTIP:%HTTPPORT
|
||||||
Accept: */*
|
Accept: */*
|
||||||
Content-Length: 0
|
|
||||||
|
|
||||||
</protocol>
|
</protocol>
|
||||||
<stdout>
|
<stdout>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user