aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-02-16 14:31:23 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-02-16 14:31:23 +0000
commitac022b2e30f42f860f365348ee569f87d0fbe1cf (patch)
treeb7f616cd8189ef4af0d9abff8812efe0595baeb8 /lib/transfer.c
parentf169b750b8bf231df6df776343acbd3e3979ada5 (diff)
Christopher R. Palmer reported a problem with HTTP-POSTing using "anyauth"
that picks NTLM. Thanks to David Byron letting me test NTLM against his servers, I could quickly repeat and fix the problem. It turned out to be: When libcurl POSTs without knowing/using an authentication and it gets back a list of types from which it picks NTLM, it needs to either continue sending its data if it keeps the connection alive, or not send the data but close the connection. Then do the first step in the NTLM auth. libcurl didn't send the data nor close the connection but simply read the response-body and then sent the first negotiation step. Which then failed miserably of course. The fixed version forces a connection if there is more than 2000 bytes left to send.
Diffstat (limited to 'lib/transfer.c')
-rw-r--r--lib/transfer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 97a085d54..7142d517b 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -541,6 +541,13 @@ CURLcode Curl_readwrite(struct connectdata *conn,
if(result)
return result;
+
+ if(conn->bits.rewindaftersend) {
+ /* We rewind after a complete send, so thus we continue
+ sending now */
+ infof(data, "Keep sending data to get tossed away!\n");
+ k->keepon |= KEEP_WRITE;
+ }
}
#endif /* CURL_DISABLE_HTTP */