aboutsummaryrefslogtreecommitdiff
path: root/lib/http.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-04-04 14:50:18 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-04-04 15:46:35 +0200
commit42937f87e65554ec4b887a5bd0b34abdbf2e0977 (patch)
tree30f1ac7aa9b7aac7c1cced638570637f5939223b /lib/http.c
parentc81021f74796a391be739665fec64431a66325c4 (diff)
HTTP: don't send Content-Length: 0 _and_ Expect: 100-continue
Without request body there's no point in asking for 100-continue. Bug: http://curl.haxx.se/bug/view.cgi?id=1349 Reported-by: JimS
Diffstat (limited to 'lib/http.c')
-rw-r--r--lib/http.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/http.c b/lib/http.c
index 789ee8fa9..f803e58f8 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -2395,9 +2395,11 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
return result;
}
- result = expect100(data, conn, req_buffer);
- if(result)
- return result;
+ if(postsize != 0) {
+ result = expect100(data, conn, req_buffer);
+ if(result)
+ return result;
+ }
result = Curl_add_buffer(req_buffer, "\r\n", 2); /* end of headers */
if(result)