curl-library
Re: CURLOPT_CONNECT_ONLY: * Closing connection 2
Date: Tue, 26 Apr 2016 14:14:23 +0200
Hello Christian,
* Christian Hägele <Christian.Haegele_at_teamviewer.com> [2016-04-26 13:32]:
> I did not look at your specific problem with NTLM_SSP in detail, but I
> want to mention 4 open pull-request regarding NTLM and
> CURLOPT_CONNECT_ONLY:
Thanks a lot for the heads up. 655 fixes my issue.
https://github.com/curl/curl/pull/655.diff
diff --git a/lib/http.c b/lib/http.c
index 62952a8..a94c7a8 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -1454,8 +1454,10 @@ CURLcode Curl_http_done(struct connectdata *conn,
data->state.negotiate.state == GSS_AUTHSENT) {
/* add forbid re-use if http-code != 401/407 as a WA only needed for
* 401/407 that signal auth failure (empty) otherwise state will be RECV
- * with current code */
- if((data->req.httpcode != 401) && (data->req.httpcode != 407))
+ * with current code.
+ * Do not close CONNECT_ONLY connections. */
+ if((data->req.httpcode != 401) && (data->req.httpcode != 407) &&
+ !data->set.connect_only)
connclose(conn, "Negotiate transfer completed");
Curl_cleanup_negotiate(data);
}
Cheers,
Thomas
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-04-26