xref: /aosp_15_r20/external/curl/docs/libcurl/libcurl-env-dbg.md (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker---
2*6236dae4SAndroid Build Coastguard Workerc: Copyright (C) Daniel Stenberg, <[email protected]>, et al.
3*6236dae4SAndroid Build Coastguard WorkerSPDX-License-Identifier: curl
4*6236dae4SAndroid Build Coastguard WorkerTitle: libcurl-env-dbg
5*6236dae4SAndroid Build Coastguard WorkerSection: 3
6*6236dae4SAndroid Build Coastguard WorkerSource: libcurl
7*6236dae4SAndroid Build Coastguard WorkerSee-also:
8*6236dae4SAndroid Build Coastguard Worker  - libcurl-env (3)
9*6236dae4SAndroid Build Coastguard WorkerProtocol:
10*6236dae4SAndroid Build Coastguard Worker  - All
11*6236dae4SAndroid Build Coastguard WorkerAdded-in: n/a
12*6236dae4SAndroid Build Coastguard Worker---
13*6236dae4SAndroid Build Coastguard Worker
14*6236dae4SAndroid Build Coastguard Worker# NAME
15*6236dae4SAndroid Build Coastguard Worker
16*6236dae4SAndroid Build Coastguard Workerlibcurl-env-dbg - environment variables libcurl DEBUGBUILD understands
17*6236dae4SAndroid Build Coastguard Worker
18*6236dae4SAndroid Build Coastguard Worker# DESCRIPTION
19*6236dae4SAndroid Build Coastguard Worker
20*6236dae4SAndroid Build Coastguard WorkerThis is a set of variables only recognized and used if libcurl was built
21*6236dae4SAndroid Build Coastguard Worker"debug enabled", which should never be true for a library used in production.
22*6236dae4SAndroid Build Coastguard WorkerThese variables are intended for internal use only, subject to change and have
23*6236dae4SAndroid Build Coastguard Workermany effects on the behavior of libcurl. Refer to the source code to determine
24*6236dae4SAndroid Build Coastguard Workerhow exactly they are being used.
25*6236dae4SAndroid Build Coastguard Worker
26*6236dae4SAndroid Build Coastguard Worker## CURL_ALTSVC_HTTP
27*6236dae4SAndroid Build Coastguard Worker
28*6236dae4SAndroid Build Coastguard WorkerBypass the AltSvc HTTPS protocol restriction if this variable exists.
29*6236dae4SAndroid Build Coastguard Worker
30*6236dae4SAndroid Build Coastguard Worker## CURL_DBG_SOCK_RBLOCK
31*6236dae4SAndroid Build Coastguard Worker
32*6236dae4SAndroid Build Coastguard WorkerThe percentage of recv() calls that should be answered with a EAGAIN at random.
33*6236dae4SAndroid Build Coastguard WorkerFor TCP/UNIX sockets.
34*6236dae4SAndroid Build Coastguard Worker
35*6236dae4SAndroid Build Coastguard Worker## CURL_DBG_SOCK_RMAX
36*6236dae4SAndroid Build Coastguard Worker
37*6236dae4SAndroid Build Coastguard WorkerThe maximum data that shall be received from the network in one recv() call.
38*6236dae4SAndroid Build Coastguard WorkerFor TCP/UNIX sockets. This is applied to every recv.
39*6236dae4SAndroid Build Coastguard Worker
40*6236dae4SAndroid Build Coastguard WorkerExample: **CURL_DBG_SOCK_RMAX=400** means recv buffer size is limited to a
41*6236dae4SAndroid Build Coastguard Workermaximum of 400 bytes.
42*6236dae4SAndroid Build Coastguard Worker
43*6236dae4SAndroid Build Coastguard Worker## CURL_DBG_SOCK_WBLOCK
44*6236dae4SAndroid Build Coastguard Worker
45*6236dae4SAndroid Build Coastguard WorkerThe percentage of send() calls that should be answered with a EAGAIN at random.
46*6236dae4SAndroid Build Coastguard WorkerFor TCP/UNIX sockets.
47*6236dae4SAndroid Build Coastguard Worker
48*6236dae4SAndroid Build Coastguard Worker## CURL_DBG_SOCK_WPARTIAL
49*6236dae4SAndroid Build Coastguard Worker
50*6236dae4SAndroid Build Coastguard WorkerThe percentage of data that shall be written to the network. For TCP/UNIX
51*6236dae4SAndroid Build Coastguard Workersockets. This is applied to every send.
52*6236dae4SAndroid Build Coastguard Worker
53*6236dae4SAndroid Build Coastguard WorkerExample: **CURL_DBG_SOCK_WPARTIAL=80** means a send with 1000 bytes would
54*6236dae4SAndroid Build Coastguard Workeronly send 800.
55*6236dae4SAndroid Build Coastguard Worker
56*6236dae4SAndroid Build Coastguard Worker## CURL_DBG_QUIC_WBLOCK
57*6236dae4SAndroid Build Coastguard Worker
58*6236dae4SAndroid Build Coastguard WorkerThe percentage of send() calls that should be answered with EAGAIN at random.
59*6236dae4SAndroid Build Coastguard WorkerQUIC only.
60*6236dae4SAndroid Build Coastguard Worker
61*6236dae4SAndroid Build Coastguard Worker## CURL_DEBUG
62*6236dae4SAndroid Build Coastguard Worker
63*6236dae4SAndroid Build Coastguard WorkerTrace logging behavior as an alternative to calling curl_global_trace(3).
64*6236dae4SAndroid Build Coastguard Worker
65*6236dae4SAndroid Build Coastguard WorkerExample: **CURL_DEBUG=http/2** means trace details about HTTP/2 handling.
66*6236dae4SAndroid Build Coastguard Worker
67*6236dae4SAndroid Build Coastguard WorkerIn the curl command line tool, built with `--enable-debug`, this environment
68*6236dae4SAndroid Build Coastguard Workervariable adds to arguments like `--verbose`, `-vvv`. At least a single `-v`
69*6236dae4SAndroid Build Coastguard Workeris needed to make the run emit trace output, but when it does, the contents
70*6236dae4SAndroid Build Coastguard Workerof `CURL_DEBUG` are added and can override existing options.
71*6236dae4SAndroid Build Coastguard Worker
72*6236dae4SAndroid Build Coastguard WorkerExample: **CURL_DEBUG=tcp,-http/2 curl -vv url** means trace protocol details,
73*6236dae4SAndroid Build Coastguard Workertriggered by `-vv`, add tracing of TCP in addition and remove tracing of
74*6236dae4SAndroid Build Coastguard WorkerHTTP/2.
75*6236dae4SAndroid Build Coastguard Worker
76*6236dae4SAndroid Build Coastguard Worker## CURL_DEBUG_SIZE
77*6236dae4SAndroid Build Coastguard Worker
78*6236dae4SAndroid Build Coastguard WorkerFake the size returned by CURLINFO_HEADER_SIZE and CURLINFO_REQUEST_SIZE.
79*6236dae4SAndroid Build Coastguard Worker
80*6236dae4SAndroid Build Coastguard Worker## CURL_GETHOSTNAME
81*6236dae4SAndroid Build Coastguard Worker
82*6236dae4SAndroid Build Coastguard WorkerFake the local machine's unqualified hostname for NTLM and SMTP.
83*6236dae4SAndroid Build Coastguard Worker
84*6236dae4SAndroid Build Coastguard Worker## CURL_HSTS_HTTP
85*6236dae4SAndroid Build Coastguard Worker
86*6236dae4SAndroid Build Coastguard WorkerBypass the HSTS HTTPS protocol restriction if this variable exists.
87*6236dae4SAndroid Build Coastguard Worker
88*6236dae4SAndroid Build Coastguard Worker## CURL_FORCETIME
89*6236dae4SAndroid Build Coastguard Worker
90*6236dae4SAndroid Build Coastguard WorkerA time of 0 is used for AWS signatures and NTLM if this variable exists.
91*6236dae4SAndroid Build Coastguard Worker
92*6236dae4SAndroid Build Coastguard Worker## CURL_ENTROPY
93*6236dae4SAndroid Build Coastguard Worker
94*6236dae4SAndroid Build Coastguard WorkerA fixed faked value to use instead of a proper random number so that functions
95*6236dae4SAndroid Build Coastguard Workerin libcurl that are otherwise getting random outputs can be tested for what
96*6236dae4SAndroid Build Coastguard Workerthey generate.
97*6236dae4SAndroid Build Coastguard Worker
98*6236dae4SAndroid Build Coastguard Worker## CURL_SMALLREQSEND
99*6236dae4SAndroid Build Coastguard Worker
100*6236dae4SAndroid Build Coastguard WorkerAn alternative size of HTTP data to be sent at a time only if smaller than the
101*6236dae4SAndroid Build Coastguard Workercurrent.
102*6236dae4SAndroid Build Coastguard Worker
103*6236dae4SAndroid Build Coastguard Worker## CURL_SMALLSENDS
104*6236dae4SAndroid Build Coastguard Worker
105*6236dae4SAndroid Build Coastguard WorkerAn alternative size of socket data to be sent at a time only if smaller than
106*6236dae4SAndroid Build Coastguard Workerthe current.
107*6236dae4SAndroid Build Coastguard Worker
108*6236dae4SAndroid Build Coastguard Worker## CURL_TIME
109*6236dae4SAndroid Build Coastguard Worker
110*6236dae4SAndroid Build Coastguard WorkerFake Unix timestamp to use for AltSvc, HSTS and CURLINFO variables that are
111*6236dae4SAndroid Build Coastguard Workertime related.
112*6236dae4SAndroid Build Coastguard Worker
113*6236dae4SAndroid Build Coastguard WorkerThis variable can also be used to fake the data returned by some CURLINFO
114*6236dae4SAndroid Build Coastguard Workervariables that are not time-related (such as CURLINFO_LOCAL_PORT), and in that
115*6236dae4SAndroid Build Coastguard Workercase the value is not a timestamp.
116*6236dae4SAndroid Build Coastguard Worker
117*6236dae4SAndroid Build Coastguard Worker## CURL_TRACE
118*6236dae4SAndroid Build Coastguard Worker
119*6236dae4SAndroid Build Coastguard WorkerLDAP tracing is enabled if this variable exists and its value is 1 or greater.
120*6236dae4SAndroid Build Coastguard Worker
121*6236dae4SAndroid Build Coastguard WorkerOpenLDAP tracing is separate. Refer to CURL_OPENLDAP_TRACE.
122*6236dae4SAndroid Build Coastguard Worker
123*6236dae4SAndroid Build Coastguard Worker## CURL_OPENLDAP_TRACE
124*6236dae4SAndroid Build Coastguard Worker
125*6236dae4SAndroid Build Coastguard WorkerOpenLDAP tracing is enabled if this variable exists and its value is 1 or
126*6236dae4SAndroid Build Coastguard Workergreater. There is a number of debug levels, refer to *openldap.c* comments.
127*6236dae4SAndroid Build Coastguard Worker
128*6236dae4SAndroid Build Coastguard Worker## CURL_WS_CHUNK_SIZE
129*6236dae4SAndroid Build Coastguard Worker
130*6236dae4SAndroid Build Coastguard WorkerUsed to influence the buffer chunk size used for WebSocket encoding and
131*6236dae4SAndroid Build Coastguard Workerdecoding.
132*6236dae4SAndroid Build Coastguard Worker
133*6236dae4SAndroid Build Coastguard Worker## CURL_FORBID_REUSE
134*6236dae4SAndroid Build Coastguard Worker
135*6236dae4SAndroid Build Coastguard WorkerUsed to set the CURLOPT_FORBID_REUSE flag on each transfer initiated
136*6236dae4SAndroid Build Coastguard Workerby the curl command line tool. The value of the environment variable
137*6236dae4SAndroid Build Coastguard Workerdoes not matter.
138*6236dae4SAndroid Build Coastguard Worker
139*6236dae4SAndroid Build Coastguard Worker## CURL_GRACEFUL_SHUTDOWN
140*6236dae4SAndroid Build Coastguard Worker
141*6236dae4SAndroid Build Coastguard WorkerMake a blocking, graceful shutdown of all remaining connections when
142*6236dae4SAndroid Build Coastguard Workera multi handle is destroyed. This implicitly triggers for easy handles
143*6236dae4SAndroid Build Coastguard Workerthat are run via easy_perform. The value of the environment variable
144*6236dae4SAndroid Build Coastguard Workergives the shutdown timeout in milliseconds.
145