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 of recv() calls that should be answered with an EAGAIN at random. For TCP/UNIX sockets. πŸ’€
  • CURL_DBG_SOCK_RMAX β€” the maximum data that shall be received from the network in one recv() call. For TCP/UNIX sockets. This is applied to every recv.

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 of send() calls that should be answered with an EAGAIN at 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 every send.

Example: CURL_DBG_SOCK_WPARTIAL=80 means a send with 1000 bytes would only send 800. πŸ’…

  • CURL_DBG_QUIC_WBLOCK β€” the percentage of send() calls that should be answered with an EAGAIN at random. QUIC only. πŸ¦‹
  • CURL_DEBUG β€” trace logging behavior as an alternative to calling curl_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 by CURLINFO_HEADER_SIZE and CURLINFO_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 using ftp: β€” returns before sending the PWD command 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 of 0 is 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 and CURLINFO variables 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 is 1 or greater.

OpenLDAP tracing is separate. Refer to CURL_OPENLDAP_TRACE. 🌸

  • CURL_OPENLDAP_TRACE β€” OpenLDAP tracing is enabled if this variable exists and its value is 1 or greater. There is a number of debug levels, refer to openldap.c comments. πŸ’€
  • 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 the CURLOPT_FORBID_REUSE flag 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 via easy_perform. The value of the environment variable gives the shutdown timeout in milliseconds. 🫢

🌈 SEE ALSO 🌈


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