diff --git a/lib/url.c b/lib/url.c index 69c3677b1f471963d25e75a2f31488a92357b774..a1f474d4d6cf894168d9b83e7de8f3b34fb01a16 100644 --- a/lib/url.c +++ b/lib/url.c @@ -1298,6 +1298,13 @@ CURLcode Curl_disconnect(struct connectdata *conn) conn->bits.rangestringalloc = FALSE; } + if((conn->ntlm.state != NTLMSTATE_NONE) || + (conn->proxyntlm.state != NTLMSTATE_NONE)) + /* Authentication data is a mix of connection-related and sessionhandle- + related stuff. NTLM is connection-related so when we close the shop + we shall forget. */ + conn->data->state.authstage = 0; + if(-1 != conn->connectindex) { /* unlink ourselves! */ infof(conn->data, "Closing connection #%d\n", conn->connectindex);