aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2010-07-06 22:50:21 +0200
committerDaniel Stenberg <daniel@haxx.se>2010-07-06 22:50:21 +0200
commite01cc7737c92897fb8286e3df6392ab434cdced6 (patch)
treec0977355552906f7110a1909d7c1fb7245787d5d
parentbd36927f1883c7609a20c186f039c443ad7f3ee3 (diff)
http: don't enable chunked during authentication negotiations
As mentioned in bug report #2956968, the HTTP code wouldn't send the first empty chunk during the auth negotiation phase of the HTTP request sending, so the server would wait for data to come and libcurl would wait for data to arrive... I've made the code not enable chunked encoding until the auth negotiation is done and thus this scenario doesn't occur anymore. Reported by: Sidney San Martín Bug: http://curl.haxx.se/bug/view.cgi?id=2956968
-rw-r--r--lib/http.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/http.c b/lib/http.c
index d510e6a9e..93a5e3e33 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -2222,7 +2222,10 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
if((conn->protocol&PROT_HTTP) &&
data->set.upload &&
(data->set.infilesize == -1)) {
- if (use_http_1_1(data, conn)) {
+ if(conn->bits.authneg)
+ /* don't enable chunked during auth neg */
+ ;
+ else if(use_http_1_1(data, conn)) {
/* HTTP, upload, unknown file size and not HTTP 1.0 */
data->req.upload_chunky = TRUE;
}