1--- 2c: Copyright (C) Daniel Stenberg, <daniel.se>, et al. 3SPDX-License-Identifier: curl 4Title: libcurl-env-dbg 5Section: 3 6Source: libcurl 7See-also: 8 - libcurl-env (3) 9--- 10 11# NAME 12 13libcurl-env-dbg - environment variables libcurl DEBUGBUILD understands 14 15# DESCRIPTION 16 17This is a set of variables only recognized and used if libcurl was built 18"debug enabled", which should never be true for a library used in production. 19These variables are intended for internal use only, subject to change and have 20many effects on the behavior of libcurl. Refer to the source code to determine 21how exactly they are being used. 22 23## CURL_ALTSVC_HTTP 24 25Bypass the AltSvc HTTPS protocol restriction if this variable exists. 26 27## CURL_DBG_SOCK_RBLOCK 28 29The percentage of recv() calls that should be answered with a EAGAIN at random. 30For TCP/UNIX sockets. 31 32## CURL_DBG_SOCK_RMAX 33 34The maximum data that shall be received from the network in one recv() call. 35For TCP/UNIX sockets. This is applied to every recv. 36 37Example: **CURL_DBG_SOCK_RMAX=400** means recv buffer size is limited to a 38maximum of 400 bytes. 39 40## CURL_DBG_SOCK_WBLOCK 41 42The percentage of send() calls that should be answered with a EAGAIN at random. 43For TCP/UNIX sockets. 44 45## CURL_DBG_SOCK_WPARTIAL 46 47The percentage of data that shall be written to the network. For TCP/UNIX 48sockets. This is applied to every send. 49 50Example: **CURL_DBG_SOCK_WPARTIAL=80** means a send with 1000 bytes would 51only send 800. 52 53## CURL_DBG_QUIC_WBLOCK 54 55The percentage of send() calls that should be answered with EAGAIN at random. 56QUIC only. 57 58## CURL_DEBUG 59 60Trace logging behavior as an alternative to calling curl_global_trace(3). 61 62Example: **CURL_DEBUG=http/2** means trace details about HTTP/2 handling. 63 64## CURL_DEBUG_SIZE 65 66Fake the size returned by CURLINFO_HEADER_SIZE and CURLINFO_REQUEST_SIZE. 67 68## CURL_GETHOSTNAME 69 70Fake the local machine's unqualified hostname for NTLM and SMTP. 71 72## CURL_HSTS_HTTP 73 74Bypass the HSTS HTTPS protocol restriction if this variable exists. 75 76## CURL_FORCETIME 77 78A time of 0 is used for AWS signatures and NTLM if this variable exists. 79 80## CURL_ENTROPY 81 82A fixed faked value to use instead of a proper random number so that functions 83in libcurl that are otherwise getting random outputs can be tested for what 84they generate. 85 86## CURL_SMALLREQSEND 87 88An alternative size of HTTP data to be sent at a time only if smaller than the 89current. 90 91## CURL_SMALLSENDS 92 93An alternative size of socket data to be sent at a time only if smaller than 94the current. 95 96## CURL_TIME 97 98Fake unix timestamp to use for AltSvc, HSTS and CURLINFO variables that are 99time related. 100 101This variable can also be used to fake the data returned by some CURLINFO 102variables that are not time-related (such as CURLINFO_LOCAL_PORT), and in that 103case the value is not a timestamp. 104 105## CURL_TRACE 106 107LDAP tracing is enabled if this variable exists and its value is 1 or greater. 108 109OpenLDAP tracing is separate. Refer to CURL_OPENLDAP_TRACE. 110 111## CURL_NTLM_WB_FILE 112 113Debug-version of the *ntlm-wb* executable. 114 115## CURL_OPENLDAP_TRACE 116 117OpenLDAP tracing is enabled if this variable exists and its value is 1 or 118greater. There is a number of debug levels, refer to *openldap.c* comments. 119