From: Stefan Eissing Date: Mon, 16 Jun 2025 07:54:20 +0000 (+0200) Subject: docs: fix documentation of connect_only 2 X-Git-Tag: curl-8_15_0~212 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a686ee6b0002b26774fe148a95945e5d3db17c9;p=thirdparty%2Fcurl.git docs: fix documentation of connect_only 2 Setting CURLOPT_CONNECT_ONLY with value 2 is only defined for WebSocket and the effect on other protocols is undetermined. That includes the HTTP urls. Fixes #17621 Reported-by: Kirill Obukhov Closes #17635 --- diff --git a/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.md b/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.md index 61cf2b802c..0515a8ae35 100644 --- a/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.md +++ b/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.md @@ -38,9 +38,10 @@ curl_easy_getinfo(3) as the library can set up the connection and then the application can obtain the most recently used socket for special data transfers. -Since 7.86.0, this option can be set to '2' and if HTTP or WebSocket are used, +Since 7.86.0, this option can be set to '2' and if WebSocket is used, libcurl performs the request and reads all response headers before handing -over control to the application. +over control to the application. For other protocols the behavior of '2' +is undefined. Transfers marked connect only do not reuse any existing connections and connections marked connect only are not allowed to get reused.