aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-08-23 12:34:55 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-08-23 12:34:55 +0000
commit723bfe42e7d0de40fd80b25ec64a88122f2c69f1 (patch)
treef5e8ce66873c80a9eed809c33d220768bd7bf04d /lib
parente35c7dcd72bdcf5b3d491fc61308c346d8a9d489 (diff)
Roman Koifman pointed out that libcurl send Expect: 100-continue on POSTs and
PUTs even when told to use HTTP 1.0, which is not correct.
Diffstat (limited to 'lib')
-rw-r--r--lib/http.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/lib/http.c b/lib/http.c
index 07354a1c4..29ce503f8 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -1765,10 +1765,12 @@ CURLcode Curl_http(struct connectdata *conn)
return result;
}
- if(!checkheaders(data, "Expect:")) {
- /* if not disabled explicitly we add a Expect: 100-continue
- to the headers which actually speeds up post operations (as
- there is one packet coming back from the web server) */
+ if((data->set.httpversion != CURL_HTTP_VERSION_1_0) &&
+ !checkheaders(data, "Expect:")) {
+ /* if not doing HTTP 1.0 or disabled explicitly, we add a Expect:
+ 100-continue to the headers which actually speeds up post
+ operations (as there is one packet coming back from the web
+ server) */
result = add_bufferf(req_buffer,
"Expect: 100-continue\r\n");
if(result)
@@ -1832,10 +1834,12 @@ CURLcode Curl_http(struct connectdata *conn)
return result;
}
- if(!checkheaders(data, "Expect:")) {
- /* if not disabled explicitly we add a Expect: 100-continue
- to the headers which actually speeds up post operations (as
- there is one packet coming back from the web server) */
+ if((data->set.httpversion != CURL_HTTP_VERSION_1_0) &&
+ !checkheaders(data, "Expect:")) {
+ /* if not HTTP 1.0 or disabled explicitly, we add a Expect:
+ 100-continue to the headers which actually speeds up post
+ operations (as there is one packet coming back from the web
+ server) */
result = add_bufferf(req_buffer,
"Expect: 100-continue\r\n");
if(result)
@@ -1945,10 +1949,12 @@ CURLcode Curl_http(struct connectdata *conn)
/* set the upload size to the progress meter */
Curl_pgrsSetUploadSize(data, http->postsize);
- if(!checkheaders(data, "Expect:")) {
- /* if not disabled explicitly we add a Expect: 100-continue to the
- headers which actually speeds up post operations (as there is
- one packet coming back from the web server) */
+ if((data->set.httpversion != CURL_HTTP_VERSION_1_0) &&
+ !checkheaders(data, "Expect:")) {
+ /* if not HTTP 1.0 or disabled explicitly, we add a Expect:
+ 100-continue to the headers which actually speeds up post
+ operations (as there is one packet coming back from the web
+ server) */
add_bufferf(req_buffer,
"Expect: 100-continue\r\n");
data->set.expect100header = TRUE;