libcurl-env-dbg(3)
π libcurl-env-dbg(3) β environment variables libcurl DEBUGBUILD understands π
β¨ NAME β¨
libcurl-env-dbg β the environment variables that a libcurl built with DEBUGBUILD understands π
π DESCRIPTION π
okay so bestie, this is a whole set of environment variables that are only recognized and used if libcurl was built βdebug enabledβ β and that should never be true for a library used in production. fr fr. These variables are intended for internal use only, theyβre subject to change, and they have many effects on how libcurl behaves. If you need to know exactly how theyβre being used, refer to the source code. iykyk π«Ά
CURL_ALTSVC_HTTPβ if this variable exists, it bypasses the AltSvc HTTPS protocol restriction. πCURL_DBG_SOCK_RBLOCKβ the percentage ofrecv()calls that should be answered with anEAGAINat random. For TCP/UNIX sockets. πCURL_DBG_SOCK_RMAXβ the maximum data that shall be received from the network in onerecv()call. For TCP/UNIX sockets. This is applied to everyrecv.
Example: CURL_DBG_SOCK_RMAX=400 means the recv buffer size is limited to a maximum of 400 bytes. π
CURL_DBG_SOCK_WBLOCKβ the percentage ofsend()calls that should be answered with anEAGAINat random. For TCP/UNIX sockets. πCURL_DBG_SOCK_WPARTIALβ the percentage of data that shall be written to the network. For TCP/UNIX sockets. This is applied to everysend.
Example: CURL_DBG_SOCK_WPARTIAL=80 means a send with 1000 bytes would only send 800. π
CURL_DBG_QUIC_WBLOCKβ the percentage ofsend()calls that should be answered with anEAGAINat random. QUIC only. π¦CURL_DEBUGβ trace logging behavior as an alternative to callingcurl_global_trace(3).
Example: CURL_DEBUG=http/2 means trace details about HTTP/2 handling. πΈ
In the curl command line tool, built with --enable-debug, this environment variable adds to arguments like --verbose, -vvv. At least a single -v is needed to make the run emit trace output, but when it does, the contents of CURL_DEBUG are added and can override existing options.
Example: CURL_DEBUG=tcp,-http/2 curl -vv url means trace protocol details, triggered by -vv, add tracing of TCP in addition and remove tracing of HTTP/2. π₯
CURL_DEBUG_SIZEβ fake the size returned byCURLINFO_HEADER_SIZEandCURLINFO_REQUEST_SIZE. πCURL_DNS_SERVERβ when built with c-ares for name resolving, setting this environment variable to[IP:port]makes libcurl use that DNS server instead of the system default. This is used by the curl test suite. π§CURL_FTP_PWD_STOPβ when set, the first transfer β when usingftp:β returns before sending thePWDcommand and stop any further progress. This is used to test an edge case. πCURL_GETHOSTNAMEβ fake the local machineβs unqualified hostname for NTLM and SMTP. πCURL_HSTS_HTTPβ bypass the HSTS HTTPS protocol restriction if this variable exists. πCURL_FORCETIMEβ a time of0is used for AWS signatures and NTLM if this variable exists. βCURL_ENTROPYβ a fixed faked value to use instead of a proper random number so that functions in libcurl that are otherwise getting random outputs can be tested for what they generate. πCURL_SMALLREQSENDβ an alternative size of HTTP data to be sent at a time only if smaller than the current. π¦CURL_SMALLSENDSβ an alternative size of socket data to be sent at a time only if smaller than the current. πCURL_TIMEβ fake Unix timestamp to use for AltSvc, HSTS andCURLINFOvariables that are time related.
This variable can also be used to fake the data returned by some CURLINFO variables that are not time-related (such as CURLINFO_LOCAL_PORT), and in that case the value is not a timestamp. π
CURL_TRACEβ LDAP tracing is enabled if this variable exists and its value is1or greater.
OpenLDAP tracing is separate. Refer to CURL_OPENLDAP_TRACE. πΈ
CURL_OPENLDAP_TRACEβ OpenLDAP tracing is enabled if this variable exists and its value is1or greater. There is a number of debug levels, refer toopenldap.ccomments. πCURL_WS_CHUNK_SIZEβ used to influence the buffer chunk size used for WebSocket encoding and decoding. π§CURL_WS_CHUNK_EAGAINβ used to simulate blocking sends after this chunk size for WebSocket connections. πCURL_WS_FORCE_ZERO_MASKβ used to set the bitmask of all sent WebSocket frames to zero. The value of the environment variable does not matter. πCURL_FORBID_REUSEβ used to set theCURLOPT_FORBID_REUSEflag on each transfer initiated by the curl command line tool. The value of the environment variable does not matter. π₯CURL_GRACEFUL_SHUTDOWNβ make a blocking, graceful shutdown of all remaining connections when a multi handle is destroyed. This implicitly triggers for easy handles that are run viaeasy_perform. The value of the environment variable gives the shutdown timeout in milliseconds. π«Ά
π SEE ALSO π
libcurl-env(3)β go read that one too bestie π
okay bye bestie π«Ά this page is from libcurl, dated 2026-10-12, and itβs the libcurl-env-dbg(3) manual page. mwah πβ¨
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms